Skip to content

Commit 14ab374

Browse files
author
dterefe
committed
Bugfix: pipeline editor kept stale component reference while editing
1 parent 5ce2f0e commit 14ab374

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

DUUIWeb/src/lib/svelte/components/LayeredPipelineComponents.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311
use:dndzone={{ items: orderedComponents, dropTargetStyle: {} }}
312312
on:consider={handleDndConsider}
313313
on:finalize={handleDndFinalize}
314-
class="grid md:max-w-5xl mx-auto !cursor-move p-20 variant-soft-primary"
314+
class="grid md:max-w-5xl mx-auto !cursor-move p-20"
315315
>
316316
{#each orderedComponents as component, i (component.id)}
317317
<div

DUUIWeb/src/lib/svelte/components/PipelineComponent.svelte

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@
2727
const dispatcher = createEventDispatcher()
2828
2929
const drawerStore = getDrawerStore()
30-
const drawer: DrawerSettings = {
31-
id: 'component',
32-
...componentDrawerSettings,
33-
meta: { component: component, inEditor: inEditor, example: example }
30+
31+
const openDrawer = () => {
32+
const drawer: DrawerSettings = {
33+
id: 'component',
34+
...componentDrawerSettings,
35+
meta: { component, inEditor, example }
36+
}
37+
drawerStore.open(drawer)
3438
}
3539
</script>
3640

@@ -67,9 +71,7 @@
6771
<button
6872
disabled={!editable}
6973
class="pointer-events-auto button-neutral !border-none"
70-
on:click={() => {
71-
drawerStore.open(drawer)
72-
}}
74+
on:click={openDrawer}
7375
>
7476
<Fa icon={faEdit} size="lg" />
7577
<p>Edit</p>

0 commit comments

Comments
 (0)