summaryrefslogtreecommitdiffstats
path: root/webapp/components/more_direct_channels/more_direct_channels.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/more_direct_channels/more_direct_channels.jsx')
-rw-r--r--webapp/components/more_direct_channels/more_direct_channels.jsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/webapp/components/more_direct_channels/more_direct_channels.jsx b/webapp/components/more_direct_channels/more_direct_channels.jsx
index 46c04c46e..ab338f68e 100644
--- a/webapp/components/more_direct_channels/more_direct_channels.jsx
+++ b/webapp/components/more_direct_channels/more_direct_channels.jsx
@@ -185,11 +185,18 @@ export default class MoreDirectChannels extends React.Component {
}
}
+ resetPaging = () => {
+ if (this.refs.multiselect) {
+ this.refs.multiselect.resetPaging();
+ }
+ }
+
search(term) {
clearTimeout(this.searchTimeoutId);
this.term = term;
if (term === '') {
+ this.resetPaging();
this.onChange();
return;
}
@@ -203,7 +210,7 @@ export default class MoreDirectChannels extends React.Component {
this.searchTimeoutId = setTimeout(
() => {
- searchUsers(term, teamId);
+ searchUsers(term, teamId, {}, this.resetPaging);
},
Constants.SEARCH_TIMEOUT_MILLISECONDS
);
@@ -315,6 +322,7 @@ export default class MoreDirectChannels extends React.Component {
<Modal.Body>
<MultiSelect
key='moreDirectChannelsList'
+ ref='multiselect'
options={users}
optionRenderer={this.renderOption}
values={this.state.values}