From fe7d14ba2c8597cc82e97f5dc256a03d0c95a0b9 Mon Sep 17 00:00:00 2001 From: devanshu052000 Date: Mon, 28 Apr 2025 16:46:52 +0530 Subject: [PATCH] Fix: Incorrect value exposed for default value in dropdown --- frontend/src/Editor/Components/DropdownV2/DropdownV2.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/Editor/Components/DropdownV2/DropdownV2.jsx b/frontend/src/Editor/Components/DropdownV2/DropdownV2.jsx index 1f3c4dc451..7bbf665839 100644 --- a/frontend/src/Editor/Components/DropdownV2/DropdownV2.jsx +++ b/frontend/src/Editor/Components/DropdownV2/DropdownV2.jsx @@ -267,6 +267,11 @@ export const DropdownV2 = ({ setExposedVariable('isMandatory', isMandatory); }, [isMandatory]); + useEffect(() => { + if (isInitialRender.current) return; + setExposedVariable('value', currentValue); + }, [currentValue]); + useEffect(() => { if (isInitialRender.current) return; const validationStatus = validate(currentValue);