fix: search users

This commit is contained in:
jsers 2020-05-22 14:15:31 +08:00
parent e74db54485
commit 79b3698b64
1 changed files with 2 additions and 2 deletions

View File

@ -43,11 +43,11 @@ class TeamForm extends Component<Props & FormProps, State> {
this.fetchUser();
}
fetchUser = () => {
fetchUser = (query = '') => {
this.lastFetchId += 1;
const fetchId = this.lastFetchId;
this.setState({ users: [], fetching: true });
request(`${api.user}?limit=1000`).then((res) => {
request(`${api.user}?limit=1000&query=${query}`).then((res) => {
if (fetchId !== this.lastFetchId) {
// for fetch callback order
return;