diff --git a/packages/builder/package.json b/packages/builder/package.json index d308c1e5ec..6d0bb15083 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -79,6 +79,7 @@ "posthog-js": "1.4.5", "remixicon": "2.5.0", "shortid": "2.2.15", + "svelte-dnd-action": "^0.8.9", "svelte-loading-spinners": "^0.1.1", "svelte-portal": "0.1.0", "uuid": "8.3.1", diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventEditor.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventEditor.svelte index 43a4be6fa5..782d360cbe 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventEditor.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventEditor.svelte @@ -1,11 +1,22 @@
@@ -69,21 +87,23 @@
{#if actions && actions.length > 0} - {#each actions as action, index} -
-
- {index + 1}. - {action[EVENT_TYPE_KEY]} +
+ {#each actions as action, index (action.id)} +
+
+ {index + 1}. + {action[EVENT_TYPE_KEY]} +
+ deleteAction(index)} />
- deleteAction(index)} /> -
- {/each} + {/each} +
{/if}
diff --git a/packages/builder/yarn.lock b/packages/builder/yarn.lock index 92910ffcb1..593a2ed815 100644 --- a/packages/builder/yarn.lock +++ b/packages/builder/yarn.lock @@ -6686,6 +6686,11 @@ supports-color@^7.0.0, supports-color@^7.1.0, supports-color@^7.2.0: dependencies: has-flag "^4.0.0" +svelte-dnd-action@^0.8.9: + version "0.8.9" + resolved "https://registry.yarnpkg.com/svelte-dnd-action/-/svelte-dnd-action-0.8.9.tgz#90fa211057a5d9e832d5521511f9c1b87242d2ae" + integrity sha512-4WaLRvERr2JoX6Lh9GnlEZRzFF5eY3h2q0n5+lS4/+nqqQjTIpCwTrncMf9tJNa+M4AGy43I5aq5F+Ohl/nxLg== + svelte-flatpickr@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/svelte-flatpickr/-/svelte-flatpickr-2.4.0.tgz#190871fc3305956c8c8fd3601cd036b8ac71ef49"