1
0
Fork 0
mirror of synced 2024-09-12 23:43:09 +12:00

Add support for overriding column widths in grid block

This commit is contained in:
Andrew Kingston 2024-05-03 15:11:39 +01:00
parent 84b4faf0eb
commit 0387e226fa
2 changed files with 2 additions and 1 deletions

View file

@ -85,6 +85,7 @@
columns?.forEach(column => {
overrides[column.field] = {
displayName: column.label,
width: column.width,
}
})
return overrides

View file

@ -194,7 +194,7 @@ export const initialise = context => {
name: field,
label: fieldSchema.displayName || field,
schema: fieldSchema,
width: fieldSchema.width || oldColumn?.width || DefaultColumnWidth,
width: oldColumn?.width || fieldSchema.width || DefaultColumnWidth,
visible: fieldSchema.visible ?? true,
order: fieldSchema.order ?? oldColumn?.order,
primaryDisplay: field === primaryDisplay,