From dca070fb4f263896c05fadff805a61809b10dc09 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 14 Sep 2024 08:14:45 +0530 Subject: [PATCH] feat: prevent list text label edit if field confirmed --- src/components/organisms/RightSidePanel.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index 36986203..e1c4d26f 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -41,6 +41,10 @@ export const RightSidePanel: React.FC = ({ onFinishCapture const handleTextLabelChange = (id: number, label: string, listId?: number, fieldKey?: string) => { if (listId !== undefined && fieldKey !== undefined) { + // Prevent editing if the field is confirmed + if (confirmedListTextFields[listId]?.[fieldKey]) { + return; + } // This is a text field within a list step updateListTextFieldLabel(listId, fieldKey, label); } else {