diff --git a/frontend/src/Editor/Components/Toggle.jsx b/frontend/src/Editor/Components/Toggle.jsx index fcf6ed795b..15958f4901 100644 --- a/frontend/src/Editor/Components/Toggle.jsx +++ b/frontend/src/Editor/Components/Toggle.jsx @@ -37,9 +37,9 @@ export const ToggleSwitch = ({ const toggleSwitchColorProperty = component.definition.styles.toggleSwitchColor; const toggleSwitchColor = toggleSwitchColorProperty ? toggleSwitchColorProperty.value : '#3c92dc'; const textColor = textColorProperty ? textColorProperty.value : '#000'; - const widgetVisibility = component.definition.styles?.visibility?.value ?? true; - const disabledState = component.definition.styles?.disabledState?.value ?? false; - + const widgetVisibility = component.definition.styles.visibility?.value ?? true; + const disabledState = component.definition.styles.disabledState?.value ?? false; + const parsedDisabledState = typeof disabledState !== 'boolean' ? resolveWidgetFieldValue(disabledState, currentState) : disabledState;