Add runners reactivity

This commit is contained in:
2023-04-12 21:09:40 +02:00
parent 195d182cc9
commit 06411dc147
3 changed files with 32 additions and 13 deletions

View File

@@ -11,6 +11,9 @@
import isMobilePhone from "validator/es/lib/isMobilePhone";
import Toastify from "toastify-js";
import Select from "svelte-select";
import { createEventDispatcher } from "svelte";
const dispatch = createEventDispatcher();
export let modal_open;
export let current_runners;
$: selected_team = undefined;
@@ -107,8 +110,7 @@
duration: 500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
current_runners.push(result);
current_runners = current_runners;
dispatch("created", { runners: [result] });
})
.catch((err) => {
//