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:editable
bind:original_data
on:dataUpdated={(event) => {
current_cards[
current_cards.findIndex((c) => c.id === event.detail.card.id)
] = event.detail.card;
current_cards = current_cards;
on:dataUpdated={(editevent) => {
console.log(editevent.detail.card)
current_cards = current_cards.filter((c) => c.id !== editevent.detail.card.id).concat([editevent.detail.card]).sort((a, b) => a.code - b.code);
options.update((options) => ({
...options,
data: current_cards,