-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Description
In the console I can see this error
Uncaught TypeError: Cannot read properties of undefined (reading 'parentElement')
at keepOriginalElementInDom (
Here is my code
<script lang="ts">
import { dndzone, type DndEvent } from 'svelte-dnd-action';
let { images = $bindable()}: { images: ImageType[] } = $props();
function handleDndConsider(e: CustomEvent<DndEvent<ImageType>>) {
images = e.detail.items;
}
function handleDndFinalize(e: CustomEvent<DndEvent<ImageType>>) {
images = e.detail.items;
}
</script>
<div
use:dndzone={{ items: images, flipDurationMs: 300 }}
onconsider={handleDndConsider}
onfinalize={handleDndFinalize}
class="mt-3 grid grid-cols-5 gap-3"
>
{#each images as image}
<div class="aspect-square overflow-hidden rounded-md">
...
</div>
{/each}
</div>
Metadata
Metadata
Assignees
Labels
No labels