feat: handle list text field discard
This commit is contained in:
@@ -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 getTextSettingsObject = useCallback(() => {
|
||||||
const settings: Record<string, { selector: string; tag?: string;[key: string]: any }> = {};
|
const settings: Record<string, { selector: string; tag?: string;[key: string]: any }> = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user