Don't show primary display

This commit is contained in:
Adria Navarro 2024-08-22 16:57:22 +02:00
parent 76ae3a1331
commit ca0ea3faf8
1 changed files with 13 additions and 16 deletions

View File

@ -122,22 +122,19 @@
}
const table = await cache.actions.getTable(relationshipField.tableId)
relationshipPanelColumns = Object.entries(relationshipField?.schema || {})
.map(([name, column]) => {
return {
name: name,
label: name,
primaryDisplay: name === table.primaryDisplay,
schema: {
type: table.schema[name].type,
visible: column.visible,
readonly: column.readonly,
},
}
})
.sort((a, b) =>
a.primaryDisplay === b.primaryDisplay ? 0 : a.primaryDisplay ? -1 : 1
)
relationshipPanelColumns = Object.entries(
relationshipField?.schema || {}
).map(([name, column]) => {
return {
name: name,
label: name,
schema: {
type: table.schema[name].type,
visible: column.visible,
readonly: column.readonly,
},
}
})
}
$: fetchRelationshipPanelColumns(relationshipField)