diff --git a/frontend/src/Editor/Components/DropDown.jsx b/frontend/src/Editor/Components/DropDown.jsx index 7c8f4d8902..0ff4232619 100644 --- a/frontend/src/Editor/Components/DropDown.jsx +++ b/frontend/src/Editor/Components/DropDown.jsx @@ -43,13 +43,18 @@ export const DropDown = function DropDown({ useEffect(() => { let newValue = undefined; - if (values?.includes(value)) newValue = value; - + if (values?.includes(value)) { + newValue = value; + } setCurrentValue(newValue); - setExposedVariable('value', newValue); // eslint-disable-next-line react-hooks/exhaustive-deps }, [value]); + useEffect(() => { + setExposedVariable('value', currentValue); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [currentValue]); + useEffect(() => { let newValue = undefined; if (values?.includes(currentValue)) newValue = currentValue;