Skip to content

Commit

Permalink
Retain widget on null inputs if schema is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimafisk committed Aug 24, 2023
1 parent bd8a988 commit 4bc90e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions defaults/core/cms/dynamic_form_input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
{#if label !== "plenti_salt"}
<div class="field {label}">
{#if label}
<label for="{label}">{label}</label>
<label for="{label}">{label}</label>
{/if}
{#if field === null}
{#if field === null && !schema}
<div>field is null</div>
{:else if field === undefined}
<div>field is undefined</div>
Expand Down Expand Up @@ -73,7 +73,7 @@
{/if}
{:else if typeof field === "boolean"}
<Boolean bind:field {label} />
{:else if field.constructor === [].constructor}
{:else if field?.constructor === [].constructor}
<Component
bind:field
{label}
Expand All @@ -83,7 +83,7 @@
{parentKeys}
{schema}
/>
{:else if field.constructor === ({}).constructor}
{:else if field?.constructor === ({}).constructor}
<Fieldset
bind:field
{label}
Expand All @@ -94,7 +94,7 @@
{schema}
/>
{/if}
</div>
</div>
{/if}

<style>
Expand Down

0 comments on commit 4bc90e3

Please sign in to comment.