From 1aebdea51285c1857ee93a49cb11375abb396b1e Mon Sep 17 00:00:00 2001 From: Dean Date: Thu, 4 Jan 2024 17:20:47 +0000 Subject: [PATCH] Added an internal drag zone id/type to DraggableList and its items to restrict items to their respective lists --- .../settings/controls/DraggableList/DraggableList.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/builder/src/components/design/settings/controls/DraggableList/DraggableList.svelte b/packages/builder/src/components/design/settings/controls/DraggableList/DraggableList.svelte index cce11e4b17..384f9bf098 100644 --- a/packages/builder/src/components/design/settings/controls/DraggableList/DraggableList.svelte +++ b/packages/builder/src/components/design/settings/controls/DraggableList/DraggableList.svelte @@ -13,6 +13,8 @@ export let draggable = true export let focus + let zoneType = generate() + let store = writable({ selected: null, actions: { @@ -46,6 +48,7 @@ return { id: listItemKey ? item[listItemKey] : generate(), item, + type: zoneType, } }) .filter(item => item.id) @@ -83,6 +86,8 @@ items: draggableItems, dropTargetStyle: { outline: "none" }, dragDisabled: !draggable || inactive, + type: zoneType, + dropFromOthersDisabled: true, }} on:finalize={handleFinalize} on:consider={updateRowOrder}