From 717c204dd5cfc90ac8356563aa02e9250d01b4ed Mon Sep 17 00:00:00 2001 From: samhere06 Date: Wed, 13 May 2026 19:13:23 +0530 Subject: [PATCH 1/2] Fix:attachment based on EA-D5178,EA-D4802,EA-D4791 --- .../SimpleTableManual/SimpleTableManual.tsx | 2 +- .../widget/Attachment/Attachment.tsx | 37 +++++++++++++------ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx b/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx index 60ab5bcf..aec9d130 100644 --- a/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +++ b/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx @@ -261,7 +261,7 @@ export default function SimpleTableManual(props: PropsWithChildren(null); const fileInputRef = useRef(null); const [toggleUploadBegin, setToggleUploadBegin] = useState(false); const deleteFile = useCallback( (file, fileIndex) => { - setAnchorEl(null); + setMenuAnchorEl(null); + setMenuOpenIndex(null); // reset the file input so that it will allow re-uploading the same file after deletion if (fileInputRef.current) { @@ -426,16 +427,23 @@ export default function Attachment(props: AttachmentProps) { isArrayDeepMerge: false, removePropertyFromChangedList: true }); + } else { + const serverFiles = transformAttachments(); + attachmentCount.current = attachments.length; + filesWithError.current = []; + setFiles(serverFiles); } } }, [memoizedAttachments]); - const handleClick = event => { - setAnchorEl(event.currentTarget); + const handleClick = (event, index) => { + setMenuAnchorEl(event.currentTarget); + setMenuOpenIndex(index); }; const handleClose = () => { - setAnchorEl(null); + setMenuAnchorEl(null); + setMenuOpenIndex(null); }; const content = ( @@ -498,20 +506,27 @@ export default function Attachment(props: AttachmentProps) {
handleClick(event, index)} size='large' > - + { - setAnchorEl(null); + handleClose(); onFileDownload(item.responseProps ? item.responseProps : {}); }} > From e3a9af3078ec377958a52158446fb349fa5103f0 Mon Sep 17 00:00:00 2001 From: samhere06 <118881732+samhere06@users.noreply.github.com> Date: Mon, 18 May 2026 13:20:20 +0530 Subject: [PATCH 2/2] updated styling of menu --- .../src/components/widget/Attachment/Attachment.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-sdk-components/src/components/widget/Attachment/Attachment.tsx b/packages/react-sdk-components/src/components/widget/Attachment/Attachment.tsx index 88970d72..1218bd7a 100644 --- a/packages/react-sdk-components/src/components/widget/Attachment/Attachment.tsx +++ b/packages/react-sdk-components/src/components/widget/Attachment/Attachment.tsx @@ -515,9 +515,10 @@ export default function Attachment(props: AttachmentProps) {