From 77a2cbbb2ea5cb371fcba5b26bf1fb1d86168b9d Mon Sep 17 00:00:00 2001 From: saithsab877 Date: Fri, 1 Nov 2024 22:07:43 +0500 Subject: [PATCH] fix(color): editing color doesn't trigger confirm button --- .../ModalsContainer/BlueprintModal/Body/Editor/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx b/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx index 894f2a403..ffbfaea43 100644 --- a/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx +++ b/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx @@ -420,6 +420,10 @@ export const Editor = ({ }) useEffect(() => { + if (selectedColor !== selectedSchema?.primary_color) { + setSubmitDisabled(false) + } + const subscription = form.watch((values) => { const isMatch = compareAttributes(attributes, parsedData) @@ -439,7 +443,7 @@ export const Editor = ({ }) return () => subscription.unsubscribe() - }, [form, attributes, parsedData, selectedSchema, loading, displayParentError]) + }, [form, attributes, parsedData, selectedSchema, loading, displayParentError, selectedColor]) const resolvedParentValue = () => parentOptions?.find((i) => i.value === parent)