Fix display
This commit is contained in:
parent
2bc96addc2
commit
db2fcf3606
|
@ -1,11 +1,9 @@
|
|||
<script>
|
||||
import RelationshipField from "./RelationshipField.svelte"
|
||||
|
||||
const schema = {
|
||||
...$$props.schema,
|
||||
// This is not really used, just adding some content to be able to render the relationship cell
|
||||
tableId: "external",
|
||||
}
|
||||
</script>
|
||||
|
||||
<RelationshipField {...$$props} {schema} datasourceType={"user"} />
|
||||
<RelationshipField
|
||||
{...$$props}
|
||||
datasourceType={"user"}
|
||||
primaryDisplay={"email"}
|
||||
/>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
export let onChange
|
||||
export let filter
|
||||
export let datasourceType = "table"
|
||||
export let primaryDisplay
|
||||
|
||||
let fieldState
|
||||
let fieldApi
|
||||
|
@ -25,6 +26,9 @@
|
|||
let searchTerm
|
||||
let open
|
||||
|
||||
$: type =
|
||||
datasourceType === "table" ? FieldTypes.LINK : FieldTypes.BB_REFERENCE
|
||||
|
||||
$: multiselect = fieldSchema?.relationshipType !== "one-to-many"
|
||||
$: linkedTableId = fieldSchema?.tableId
|
||||
$: fetch = fetchData({
|
||||
|
@ -45,7 +49,7 @@
|
|||
: flatten(fieldState?.value)?.[0]
|
||||
$: component = multiselect ? CoreMultiselect : CoreSelect
|
||||
$: expandedDefaultValue = expand(defaultValue)
|
||||
$: primaryDisplay = tableDefinition?.primaryDisplay
|
||||
$: primaryDisplay = primaryDisplay || tableDefinition?.primaryDisplay
|
||||
|
||||
let optionsObj = {}
|
||||
let initialValuesProcessed
|
||||
|
@ -162,7 +166,7 @@
|
|||
{disabled}
|
||||
{validation}
|
||||
defaultValue={expandedDefaultValue}
|
||||
type={FieldTypes.LINK}
|
||||
{type}
|
||||
bind:fieldState
|
||||
bind:fieldApi
|
||||
bind:fieldSchema
|
||||
|
|
Loading…
Reference in New Issue