Skip to content

Commit

Permalink
fix(ui): Allows deselection of members in add members modal for a gro…
Browse files Browse the repository at this point in the history
…up (#8349)
  • Loading branch information
Sukeerthi31 authored Jul 30, 2023
1 parent 753b0f1 commit dafb150
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ export const AddGroupMembersModal = ({ urn, visible, onCloseModal, onSubmit }: P
setSelectedMembers(newUsers);
};

const onDeselectMember = (memberUrn: string) => {
const onDeselectMember = (memberUrn: { key: string; label: React.ReactNode; value: string }) => {
setInputValue('');
const newUserActors = selectedMembers.filter((user) => user !== memberUrn);
const newUserActors = selectedMembers.filter((user) => user.value !== memberUrn.value);
setSelectedMembers(newUserActors);
};

Expand Down

0 comments on commit dafb150

Please sign in to comment.