From 9575c53ed8b64ecb2cd99af8516a3b6f2e9666ce Mon Sep 17 00:00:00 2001 From: samhere06 <118881732+samhere06@users.noreply.github.com> Date: Wed, 20 Nov 2024 01:22:17 +0530 Subject: [PATCH] Fix error when modal submitted without filling required field (#425) Co-authored-by: mohas22 --- .../ListViewActionButtons/ListViewActionButtons.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/react-sdk-components/src/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx b/packages/react-sdk-components/src/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx index 4d07c82e..9d6edede 100644 --- a/packages/react-sdk-components/src/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +++ b/packages/react-sdk-components/src/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx @@ -49,10 +49,13 @@ function ListViewActionButtons(props: ListViewActionButtonsProps) { getPConnect() .getActionsApi() .submitEmbeddedDataModal(context) - .then(() => {}) - .finally(() => { + .then(() => { setIsDisabled(false); closeActionsDialog(); + }) + .catch(err => { + // eslint-disable-next-line no-console + console.log(err); }); }} >