summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-06-01 17:20:57 -0400
committerJoram Wilander <jwawilander@gmail.com>2017-06-01 17:20:57 -0400
commit43c440e8a40ebfc4d14c93d636d4c3f1fa6dc606 (patch)
tree3b5d022cd1eb1f1bd0b1ac4d39b06342932f78ff /webapp
parent3b74effacd9308649431245f7d4142b47b4fae0f (diff)
downloadchat-43c440e8a40ebfc4d14c93d636d4c3f1fa6dc606.tar.gz
chat-43c440e8a40ebfc4d14c93d636d4c3f1fa6dc606.tar.bz2
chat-43c440e8a40ebfc4d14c93d636d4c3f1fa6dc606.zip
PLT-6552 Fixed system users list ignoring search term after changing teams (#6537)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/admin_console/system_users/system_users.jsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/webapp/components/admin_console/system_users/system_users.jsx b/webapp/components/admin_console/system_users/system_users.jsx
index ae6ebef86..645d1e9e6 100644
--- a/webapp/components/admin_console/system_users/system_users.jsx
+++ b/webapp/components/admin_console/system_users/system_users.jsx
@@ -158,6 +158,11 @@ export default class SystemUsers extends React.Component {
}
loadDataForTeam(teamId) {
+ if (this.state.term) {
+ this.search(this.state.term, teamId);
+ return;
+ }
+
if (teamId === ALL_USERS) {
loadProfiles(0, Constants.PROFILE_CHUNK_SIZE, this.loadComplete);
getStandardAnalytics();
@@ -193,9 +198,9 @@ export default class SystemUsers extends React.Component {
}
}
- search(term) {
+ search(term, teamId = this.state.teamId) {
if (term === '') {
- this.updateUsersFromStore(this.state.teamId, term);
+ this.updateUsersFromStore(teamId, term);
this.setState({
loading: false
@@ -205,7 +210,7 @@ export default class SystemUsers extends React.Component {
return;
}
- this.doSearch(this.state.teamId, term);
+ this.doSearch(teamId, term);
}
doSearch(teamId, term, now = false) {