Skip to content

Commit

Permalink
Merge pull request #15273 from Budibase/fix/respect-grid-config
Browse files Browse the repository at this point in the history
Respect grid config in builder
  • Loading branch information
adrinr authored Dec 31, 2024
2 parents 0923a90 + 530d390 commit ed1c9d0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/frontend-core/src/components/grid/stores/columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const initialise = (context: StoreContext) => {
columns.set([])
return
}
const $columns = get(columns)

const $displayColumn = get(displayColumn)

// Find primary display
Expand All @@ -176,16 +176,15 @@ 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,
label: fieldSchema.displayName || field,
schema: fieldSchema,
width: fieldSchema.width || oldColumn?.width || DefaultColumnWidth,
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,
Expand Down

0 comments on commit ed1c9d0

Please sign in to comment.