PLT-4815 Refactor 'More Channels' modal into the new modal pattern (#4742)
* Refactor 'More Channels' modal into the new modal pattern * Fix unit test * Readded CSS changes
Этот коммит содержится в:
коммит произвёл
enahum
родитель
c35b95709e
Коммит
7f48a7fc9d
@@ -43,6 +43,8 @@ export default class UserList extends React.Component {
|
||||
this.search = this.search.bind(this);
|
||||
this.loadComplete = this.loadComplete.bind(this);
|
||||
|
||||
this.searchTimeoutId = 0;
|
||||
|
||||
const stats = TeamStore.getStats(this.props.params.team);
|
||||
|
||||
this.state = {
|
||||
@@ -148,14 +150,21 @@ export default class UserList extends React.Component {
|
||||
const options = {};
|
||||
options[UserSearchOptions.ALLOW_INACTIVE] = true;
|
||||
|
||||
searchUsers(
|
||||
term,
|
||||
this.props.params.team,
|
||||
options,
|
||||
(users) => {
|
||||
this.setState({loading: true, search: true, users});
|
||||
loadTeamMembersForProfilesList(users, this.props.params.team, this.loadComplete);
|
||||
}
|
||||
clearTimeout(this.searchTimeoutId);
|
||||
|
||||
this.searchTimeoutId = setTimeout(
|
||||
() => {
|
||||
searchUsers(
|
||||
term,
|
||||
this.props.params.team,
|
||||
options,
|
||||
(users) => {
|
||||
this.setState({loading: true, search: true, users});
|
||||
loadTeamMembersForProfilesList(users, this.props.params.team, this.loadComplete);
|
||||
}
|
||||
);
|
||||
},
|
||||
Constants.SEARCH_TIMEOUT_MILLISECONDS
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user