preparing to move items to new location

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-10-20 09:26:47 +02:00
parent d179a33b41
commit b1517edc31
4 changed files with 45 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
<script>
import { t } from '../../translations.svelte';
let { items, selected = $bindable(null) } = $props();
let { items, selected = $bindable(null), drag_start = item => console.log({dragging:item}) } = $props();
</script>
<table>
<thead>
@@ -13,7 +13,7 @@
</thead>
<tbody>
{#each items as item}
<tr onclick={ev => selected = item}>
<tr onclick={ev => selected = item} ondragstart={e => drag_start(item)} draggable="true">
<td>{item.id}</td>
<td>{item.code}</td>
<td>{item.name}</td>