From 699f409b9ec68cf082ac13a7c4f787cb432b1f04 Mon Sep 17 00:00:00 2001 From: Sophie Turner Date: Thu, 26 Sep 2024 22:49:42 +0500 Subject: [PATCH] fix(blue-print): confirm Button Not Enabled --- .../BlueprintModal/Body/Editor/MediaOptions/index.tsx | 4 +++- .../ModalsContainer/BlueprintModal/Body/Editor/index.tsx | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/ModalsContainer/BlueprintModal/Body/Editor/MediaOptions/index.tsx b/src/components/ModalsContainer/BlueprintModal/Body/Editor/MediaOptions/index.tsx index c829ebd02..699ce65bc 100644 --- a/src/components/ModalsContainer/BlueprintModal/Body/Editor/MediaOptions/index.tsx +++ b/src/components/ModalsContainer/BlueprintModal/Body/Editor/MediaOptions/index.tsx @@ -9,9 +9,10 @@ type MediaOptionKey = 'videoAudio' | 'image' | 'sourceLink' type MediaOptionsProps = { setMediaOptions: (options: { videoAudio: boolean; image: boolean; sourceLink: boolean }) => void initialOptions: { videoAudio: boolean; image: boolean; sourceLink: boolean } + setSubmitDisabled: (disabled: boolean) => void } -const MediaOptions = ({ setMediaOptions, initialOptions }: MediaOptionsProps) => { +const MediaOptions = ({ setMediaOptions, initialOptions, setSubmitDisabled }: MediaOptionsProps) => { const [mediaOptions, setLocalMediaOptions] = useState(initialOptions) useEffect(() => { @@ -26,6 +27,7 @@ const MediaOptions = ({ setMediaOptions, initialOptions }: MediaOptionsProps) => } setMediaOptions(newOptions) + setSubmitDisabled(false) return newOptions }) diff --git a/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx b/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx index 03df72858..d76f39b6d 100644 --- a/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx +++ b/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx @@ -547,7 +547,11 @@ export const Editor = ({ onDelete={handleDeleteAttribute} parent={selectedSchema ? selectedSchema.type : parent} /> - +