allow drop on group #274

This commit is contained in:
Jan Prochazka 2022-11-10 09:45:41 +01:00
parent 909591404f
commit ebfa0a1939

View File

@ -35,19 +35,17 @@
return res;
});
}
</script>
<div
class="group"
on:click={() => (isExpanded = !isExpanded)}
on:drop={e => {
function handleDrop(e) {
var data = e.dataTransfer.getData('app_object_drag_data');
if (data && onDropOnGroup) {
e.stopPropagation();
onDropOnGroup(data, group);
}
}}
>
}
</script>
<div class="group" on:click={() => (isExpanded = !isExpanded)} on:drop={handleDrop}>
<span class="expand-icon">
<FontIcon icon={groupIconFunc(isExpanded)} />
</span>
@ -65,6 +63,7 @@
</div>
{/if}
<div on:drop={handleDrop}>
{#each items as item}
<AppObjectListItem
isHidden={!item.isMatched}
@ -77,6 +76,7 @@
{passProps}
/>
{/each}
</div>
{/if}
<style>