diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte index ebe60c7110..8b9cad1b7c 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte @@ -101,6 +101,12 @@ conditions = conditions.filter(link => link.id !== id) } + const duplicateCondition = id => { + const condition = conditions.find(link => link.id === id) + const duplicate = { ...condition, id: generate() } + conditions = [...conditions, duplicate] + } + const handleFinalize = e => { updateConditions(e) dragDisabled = true @@ -235,6 +241,12 @@ bind:value={condition.referenceValue} /> {/if} + duplicateCondition(condition.id)} + />