diff --git a/packages/frontend-core/src/components/grid/stores/columns.ts b/packages/frontend-core/src/components/grid/stores/columns.ts index f54e8067b2..1b3f6624e1 100644 --- a/packages/frontend-core/src/components/grid/stores/columns.ts +++ b/packages/frontend-core/src/components/grid/stores/columns.ts @@ -161,7 +161,7 @@ export const initialise = (context: StoreContext) => { columns.set([]) return } - const $columns = get(columns) + const $displayColumn = get(displayColumn) // Find primary display @@ -176,7 +176,6 @@ export const initialise = (context: StoreContext) => { Object.keys($enrichedSchema) .map(field => { const fieldSchema = $enrichedSchema[field] - const oldColumn = $columns?.find(col => col.name === field) const column: UIColumn = { type: fieldSchema.type, name: field, @@ -185,7 +184,7 @@ export const initialise = (context: StoreContext) => { width: fieldSchema.width || DefaultColumnWidth, visible: fieldSchema.visible ?? true, readonly: fieldSchema.readonly, - order: fieldSchema.order ?? oldColumn?.order, + order: fieldSchema.order, conditions: fieldSchema.conditions, related: fieldSchema.related, calculationType: fieldSchema.calculationType,