Remove race between clearing lists and search requests (#5686)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
bfc8dafe5e
Коммит
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(
|
||||
|
||||
Ссылка в новой задаче
Block a user