drag & drop into/from connection folder

This commit is contained in:
Jan Prochazka
2022-11-05 10:36:41 +01:00
parent b0d61f974c
commit cb619a0fe0
4 changed files with 42 additions and 8 deletions

View File

@@ -15,6 +15,7 @@
export let checkedObjectsStore = null;
export let disableContextMenu = false;
export let passProps;
export let onDropOnGroup = undefined;
let isExpanded = true;
@@ -36,7 +37,17 @@
}
</script>
<div class="group" on:click={() => (isExpanded = !isExpanded)}>
<div
class="group"
on:click={() => (isExpanded = !isExpanded)}
on:drop={e => {
var data = e.dataTransfer.getData('app_object_drag_data');
if (data && onDropOnGroup) {
e.stopPropagation();
onDropOnGroup(data, group);
}
}}
>
<span class="expand-icon">
<FontIcon icon={groupIconFunc(isExpanded)} />
</span>

View File

@@ -21,6 +21,7 @@
export let groupIconFunc = plusExpandIcon;
export let groupFunc = undefined;
export let onDropOnGroup = undefined;
$: filtered = !groupFunc
? list.filter(data => {
@@ -83,6 +84,7 @@
{passProps}
{getIsExpanded}
{setIsExpanded}
{onDropOnGroup}
/>
{/each}
{:else}