fix(cards): Update table for edit events

This commit is contained in:
Nicolai Ort 2025-04-25 16:10:11 +02:00
parent 98a3b07237
commit 27396e17f2
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F

View File

@ -180,11 +180,9 @@
bind:runner bind:runner
bind:editable bind:editable
bind:original_data bind:original_data
on:dataUpdated={(event) => { on:dataUpdated={(editevent) => {
current_cards[ console.log(editevent.detail.card)
current_cards.findIndex((c) => c.id === event.detail.card.id) current_cards = current_cards.filter((c) => c.id !== editevent.detail.card.id).concat([editevent.detail.card]).sort((a, b) => a.code - b.code);
] = event.detail.card;
current_cards = current_cards;
options.update((options) => ({ options.update((options) => ({
...options, ...options,
data: current_cards, data: current_cards,