From 4ac68622e63409d5db8e2807e71d3ccde9e1d87e Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 5 Dec 2024 00:35:01 +0100 Subject: [PATCH] added missing asyncs --- .../Create{{pascal_case entry_type.name}}.svelte.hbs | 2 +- ...dit{{pascal_case entry_type.name}}.svelte{{\302\241if}}.hbs" | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.svelte.hbs b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.svelte.hbs index a6933bbf..a0c7a6ed 100644 --- a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.svelte.hbs +++ b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/Create{{pascal_case entry_type.name}}.svelte.hbs @@ -39,7 +39,7 @@ export let {{camel_case field_name}}{{#if (eq cardinality "single")}}!{{/if}}: { $: {{#each entry_type.fields}}{{camel_case field_name}}{{#unless @last}}, {{/unless}}{{/each}}; $: is{{pascal_case entry_type.name}}Valid = true{{#each entry_type.fields}}{{#if widget}}{{#if (eq cardinality "single")}} && {{> (concat field_type.type "/" widget "/is-valid") variable_to_validate=(camel_case field_name) }}{{/if}}{{#if (eq cardinality "vector")}} && {{camel_case field_name}}.every(e => {{> (concat field_type.type "/" widget "/is-valid") variable_to_validate="e" }}){{/if}}{{/if}}{{/each}}; -onMount(() => { +onMount(async () => { {{#each entry_type.fields}} {{#if (not widget) }} {{#if (ne cardinality "option")}} diff --git "a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.svelte{{\302\241if}}.hbs" "b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.svelte{{\302\241if}}.hbs" index 5e81e248..e3649462 100644 --- "a/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.svelte{{\302\241if}}.hbs" +++ "b/templates/ui-frameworks/svelte/entry-type/ui/src/{{dna_role_name}}/{{coordinator_zome_manifest.name}}/{{#if crud.update}}Edit{{pascal_case entry_type.name}}.svelte{{\302\241if}}.hbs" @@ -36,7 +36,7 @@ let {{camel_case field_name}}: Array<{{> (concat field_type.type "/type")}} | un $: {{#each (filter entry_type.fields "widget")}}{{camel_case field_name}}{{#unless @last}}, {{/unless}}{{/each}}; $: is{{pascal_case entry_type.name}}Valid = true{{#each entry_type.fields}}{{#if widget}}{{#if (eq cardinality "single")}} && {{> (concat field_type.type "/" widget "/is-valid") variable_to_validate=(camel_case field_name) }}{{/if}}{{#if (eq cardinality "vector")}} && {{camel_case field_name}}.every(e => {{> (concat field_type.type "/" widget "/is-valid") variable_to_validate="e" }}){{/if}}{{/if}}{{/each}}; -onMount(() => { +onMount(async () => { if (!currentRecord) { throw new Error(`The currentRecord input is required for the Edit{{pascal_case entry_type.name}} element`); }