forked from Open-CT/openbrain
Add matchLoading.
This commit is contained in:
parent
938b0431a5
commit
2d763e2137
|
@ -17,6 +17,7 @@ class WordsetEditPage extends React.Component {
|
||||||
wordsetName: props.match.params.wordsetName,
|
wordsetName: props.match.params.wordsetName,
|
||||||
wordset: null,
|
wordset: null,
|
||||||
vectorsets: null,
|
vectorsets: null,
|
||||||
|
matchLoading: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,11 +109,15 @@ class WordsetEditPage extends React.Component {
|
||||||
{i18next.t("wordset:Match")}:
|
{i18next.t("wordset:Match")}:
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={22} >
|
<Col span={22} >
|
||||||
<Button type="primary" onClick={() => {
|
<Button loading={this.state.matchLoading} type="primary" onClick={() => {
|
||||||
|
this.setState({
|
||||||
|
matchLoading: true,
|
||||||
|
});
|
||||||
WordsetBackend.getWordsetMatch(this.props.account.name, this.state.wordsetName)
|
WordsetBackend.getWordsetMatch(this.props.account.name, this.state.wordsetName)
|
||||||
.then((wordset) => {
|
.then((wordset) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
wordset: wordset,
|
wordset: wordset,
|
||||||
|
matchLoading: false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}}>{i18next.t("wordset:Match")}</Button>
|
}}>{i18next.t("wordset:Match")}</Button>
|
||||||
|
|
Loading…
Reference in New Issue