1
0
Fork 0
mirror of synced 2024-09-08 21:51:58 +12:00

Fix a few svelte bugs with the LinkedRowSelector component to fix adding/editing relationships via a model from the data UI

This commit is contained in:
Andrew Kingston 2023-11-08 14:43:28 +00:00
parent 7672993eae
commit bcf431a476
3 changed files with 9 additions and 4 deletions

View file

@ -64,7 +64,7 @@
</span>
{:else if schema.type === "link"}
<LinkedRowSelector
bind:linkedRows={value[field]}
linkedRows={value[field]}
{schema}
on:change={e => onChange(e, field)}
/>

View file

@ -70,7 +70,12 @@
options={meta.constraints.inclusion}
/>
{:else if type === "link"}
<LinkedRowSelector {error} bind:linkedRows={value} schema={meta} />
<LinkedRowSelector
{error}
linkedRows={value}
schema={meta}
on:change={e => (value = e.detail)}
/>
{:else if type === "longform"}
{#if meta.useRichText}
<RichTextField {error} {label} height="150px" bind:value />

View file

@ -56,12 +56,12 @@
/>
{:else}
<Multiselect
bind:value={linkedIds}
value={linkedIds}
{label}
options={rows}
getOptionLabel={getPrettyName}
getOptionValue={row => row._id}
sort
on:change={() => dispatch("change", linkedIds)}
on:change
/>
{/if}