diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte index 5839453258..ebe60c7110 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ConditionalUIDrawer.svelte @@ -54,6 +54,7 @@ }, ] + let dragDisabled = true $: definition = store.actions.components.getDefinition( $selectedComponent?._component ) @@ -96,11 +97,16 @@ ] } - const removeLink = id => { + const removeCondition = id => { conditions = conditions.filter(link => link.id !== id) } - const updateLinks = e => { + const handleFinalize = e => { + updateConditions(e) + dragDisabled = true + } + + const updateConditions = e => { conditions = e.detail.items } @@ -142,9 +148,10 @@ items: conditions, flipDurationMs, dropTargetStyle: { outline: "none" }, + dragDisabled, }} - on:finalize={updateLinks} - on:consider={updateLinks} + on:finalize={handleFinalize} + on:consider={updateConditions} > {#each conditions as condition (condition.id)}
- +
(dragDisabled = false)} + > + +