implement noInitialize for runnable component

This commit is contained in:
Ruben Fiszel
2024-02-14 22:13:28 +01:00
parent 4492279c50
commit 4a9147f9ae
2 changed files with 3 additions and 1 deletions
@@ -53,6 +53,7 @@
export let hideRefreshButton: boolean = false
export let hasChildrens: boolean
export let allowConcurentRequests = false
export let noInitialize = false
const {
worldStore,
@@ -555,7 +556,7 @@
cb: [...($runnableComponents[id]?.cb ?? []), cancellableRun]
}
if (!$initialized.initializedComponents.includes(id)) {
if (!noInitialize && !$initialized.initializedComponents.includes(id)) {
$initialized.initializedComponents = [...$initialized.initializedComponents, id]
}
})
@@ -241,6 +241,7 @@
<slot />
{:else if componentInput.type === 'runnable' && isRunnableDefined(componentInput)}
<RunnableComponent
{noInitialize}
{allowConcurentRequests}
{refreshOnStart}
{extraKey}