Skip to content

Commit

Permalink
[7.9] Update user table after user is deleted (#79491) (#79521)
Browse files Browse the repository at this point in the history
Co-authored-by: Sushrut Kasture <kasturesushrut@gmail.com>
  • Loading branch information
legrego and sushrut111 authored Oct 5, 2020
1 parent 8b50cf3 commit 5c890f8
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,18 @@ export class UsersGridPage extends Component<Props, State> {

private handleDelete = (usernames: string[], errors: string[]) => {
const { users } = this.state;
const filteredUsers = users.filter(({ username }) => {
return !usernames.includes(username) || errors.includes(username);
});
this.setState({
selection: [],
showDeleteConfirmation: false,
users: users.filter(({ username }) => {
return !usernames.includes(username) || errors.includes(username);
}),
users: filteredUsers,
visibleUsers: this.getVisibleUsers(
filteredUsers,
this.state.filter,
this.state.includeReservedUsers
),
});
};

Expand Down

0 comments on commit 5c890f8

Please sign in to comment.