recompute others for modal work even if no script attached

This commit is contained in:
Ruben Fiszel
2023-03-23 21:10:18 +01:00
parent 15812b4cec
commit a2de6c7d5f
@@ -70,6 +70,7 @@
$: loading = isLoading && ownClick
$: css = concatCustomCss($app?.css?.formbuttoncomponent, customCss)
let runnableWrapper: RunnableWrapper
</script>
{#each Object.keys(components['formbuttoncomponent'].initialData.configuration) as key (key)}
@@ -95,6 +96,7 @@
}}
>
<RunnableWrapper
bind:this={runnableWrapper}
{recomputeIds}
{render}
bind:runnableComponent
@@ -130,8 +132,11 @@
window.dispatchEvent(new Event('pointerup'))
}}
on:click={async () => {
await runnableComponent?.runComponent()
if (!runnableComponent) {
runnableWrapper.onSuccess()
} else {
await runnableComponent?.runComponent()
}
open = false
}}
size="xs"