Fixed edit update bug

ref #147
This commit is contained in:
Nicolai Ort 2023-02-22 18:06:53 +01:00
parent f0a2b2859f
commit 0feee0ae2f
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
2 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,7 @@
import { RunnerCardService, RunnerService } from "@odit/lfk-client-js";
import Select from "svelte-select";
import Toastify from "toastify-js";
import { createEventDispatcher } from "svelte";
export let edit_modal_open;
export let current_cards;
export let runner = {};
@ -21,6 +22,10 @@
$: runners = [];
$: enabled = true;
$: processed_last_submit = true;
const dispatch = createEventDispatcher();
function dataUpdated() {
dispatch('dataUpdated',);
}
RunnerService.runnerControllerGetAll().then((val) => {
runners = val.map((r) => {
return { label: getRunnerLabel(r), value: r };
@ -65,6 +70,7 @@
}).showToast();
current_cards[current_cards.findIndex((c) => c.id === id)] = result;
current_cards = current_cards;
dataUpdated();
})
.catch((err) => {
//

View File

@ -54,6 +54,7 @@
bind:runner
bind:editable
bind:original_data
on:dataUpdated={(handler.setRows(current_cards))}
/>
{/if}