summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/components/filtered_user_list.jsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/webapp/components/filtered_user_list.jsx b/webapp/components/filtered_user_list.jsx
index 4270d3731..fca68a81a 100644
--- a/webapp/components/filtered_user_list.jsx
+++ b/webapp/components/filtered_user_list.jsx
@@ -43,6 +43,15 @@ class FilteredUserList extends React.Component {
};
}
+ componentWillUpdate(nextProps) {
+ // assume the user list is immutable
+ if (this.props.users !== nextProps.users) {
+ this.setState({
+ users: this.filterUsers(nextProps.teamMembers, nextProps.users)
+ });
+ }
+ }
+
componentDidUpdate(prevProps, prevState) {
if (prevState.filter !== this.state.filter) {
$(ReactDOM.findDOMNode(this.refs.userList)).scrollTop(0);