Skip to content

Commit

Permalink
Merge pull request #18934 from dukenv0307/fix/17166
Browse files Browse the repository at this point in the history
Fix remove button remains enabled when removing a user in other device
  • Loading branch information
danieldoglas authored May 15, 2023
2 parents 92f87f7 + 20ae498 commit 6bc1bce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ class WorkspaceMembersPage extends React.Component {
this.validate();
}

if (prevProps.policyMemberList !== this.props.policyMemberList) {
this.setState((prevState) => ({
selectedEmployees: _.intersection(prevState.selectedEmployees, _.keys(this.props.policyMemberList)),
}));
}

const isReconnecting = prevProps.network.isOffline && !this.props.network.isOffline;
if (!isReconnecting) {
return;
Expand Down

0 comments on commit 6bc1bce

Please sign in to comment.