From 02980e075ec46c3c7da7abd034bedf0918e82093 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Fri, 13 Sep 2024 23:40:11 +0530 Subject: [PATCH] feat: handle list text field discard --- src/components/organisms/RightSidePanel.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index b36159d0..19ce166f 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -88,6 +88,16 @@ export const RightSidePanel: React.FC = ({ onFinishCapture })); }; + const handleListTextFieldDiscard = (listId: number, fieldKey: string) => { + removeListTextField(listId, fieldKey); + setConfirmedListTextFields(prev => ({ + ...prev, + [listId]: { + ...(prev[listId] || {}), + [fieldKey]: false + } + })); +}; const getTextSettingsObject = useCallback(() => { const settings: Record = {};