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:
parent
7672993eae
commit
bcf431a476
|
@ -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)}
|
||||
/>
|
||||
|
|
|
@ -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 />
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue