Fix issue with order 0 being ignored
This commit is contained in:
parent
cb01768e5a
commit
bb810e14d7
|
@ -77,13 +77,13 @@ export function enrichSchema(view: View | ViewV2, tableSchema: TableSchema) {
|
|||
let schema = { ...tableSchema }
|
||||
if (view.schemaUI) {
|
||||
const viewOverridesEntries = Object.entries(view.schemaUI)
|
||||
const viewSetsOrder = viewOverridesEntries.some(([_, v]) => v.order)
|
||||
const viewSetsOrder = viewOverridesEntries.some(([_, v]) => v.order != null)
|
||||
for (const [fieldName, schemaUI] of viewOverridesEntries) {
|
||||
schema[fieldName] = {
|
||||
...schema[fieldName],
|
||||
...schemaUI,
|
||||
order: viewSetsOrder
|
||||
? schemaUI.order || undefined
|
||||
? schemaUI.order ?? undefined
|
||||
: schema[fieldName].order,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue