feat: handle list text field discard

This commit is contained in:
karishmas6
2024-09-13 23:40:11 +05:30
parent 64d41896f7
commit 02980e075e

View File

@@ -88,6 +88,16 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
}));
};
const handleListTextFieldDiscard = (listId: number, fieldKey: string) => {
removeListTextField(listId, fieldKey);
setConfirmedListTextFields(prev => ({
...prev,
[listId]: {
...(prev[listId] || {}),
[fieldKey]: false
}
}));
};
const getTextSettingsObject = useCallback(() => {
const settings: Record<string, { selector: string; tag?: string;[key: string]: any }> = {};