mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Remove race between clearing lists and search requests (#5686)
This commit is contained in:
committed by
George Goldberg
parent
bfc8dafe5e
commit
cbead2d973
@@ -148,16 +148,17 @@ export default class UserList extends React.Component {
|
||||
}
|
||||
|
||||
search(term) {
|
||||
clearTimeout(this.searchTimeoutId);
|
||||
|
||||
if (term === '') {
|
||||
this.setState({search: false, users: UserStore.getProfileListInTeam(this.props.params.team)});
|
||||
this.searchTimeoutId = '';
|
||||
return;
|
||||
}
|
||||
|
||||
const options = {};
|
||||
options[UserSearchOptions.ALLOW_INACTIVE] = true;
|
||||
|
||||
clearTimeout(this.searchTimeoutId);
|
||||
|
||||
const searchTimeoutId = setTimeout(
|
||||
() => {
|
||||
searchUsers(
|
||||
|
||||
Reference in New Issue
Block a user