From dafb15071a230cbb9eff2e1565526606e6bc1c9b Mon Sep 17 00:00:00 2001 From: Sukeerthi Mandyam <69302927+Sukeerthi31@users.noreply.github.com> Date: Sun, 30 Jul 2023 15:55:32 +0530 Subject: [PATCH] fix(ui): Allows deselection of members in add members modal for a group (#8349) --- .../src/app/entity/group/AddGroupMembersModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datahub-web-react/src/app/entity/group/AddGroupMembersModal.tsx b/datahub-web-react/src/app/entity/group/AddGroupMembersModal.tsx index 25637fe91137a..45287e823523b 100644 --- a/datahub-web-react/src/app/entity/group/AddGroupMembersModal.tsx +++ b/datahub-web-react/src/app/entity/group/AddGroupMembersModal.tsx @@ -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); };