fix: search users
This commit is contained in:
parent
e74db54485
commit
79b3698b64
|
@ -43,11 +43,11 @@ class TeamForm extends Component<Props & FormProps, State> {
|
||||||
this.fetchUser();
|
this.fetchUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchUser = () => {
|
fetchUser = (query = '') => {
|
||||||
this.lastFetchId += 1;
|
this.lastFetchId += 1;
|
||||||
const fetchId = this.lastFetchId;
|
const fetchId = this.lastFetchId;
|
||||||
this.setState({ users: [], fetching: true });
|
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) {
|
if (fetchId !== this.lastFetchId) {
|
||||||
// for fetch callback order
|
// for fetch callback order
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue