Add support for overriding column widths in grid block
This commit is contained in:
parent
84b4faf0eb
commit
0387e226fa
|
@ -85,6 +85,7 @@
|
||||||
columns?.forEach(column => {
|
columns?.forEach(column => {
|
||||||
overrides[column.field] = {
|
overrides[column.field] = {
|
||||||
displayName: column.label,
|
displayName: column.label,
|
||||||
|
width: column.width,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return overrides
|
return overrides
|
||||||
|
|
|
@ -194,7 +194,7 @@ export const initialise = context => {
|
||||||
name: field,
|
name: field,
|
||||||
label: fieldSchema.displayName || field,
|
label: fieldSchema.displayName || field,
|
||||||
schema: fieldSchema,
|
schema: fieldSchema,
|
||||||
width: fieldSchema.width || oldColumn?.width || DefaultColumnWidth,
|
width: oldColumn?.width || fieldSchema.width || DefaultColumnWidth,
|
||||||
visible: fieldSchema.visible ?? true,
|
visible: fieldSchema.visible ?? true,
|
||||||
order: fieldSchema.order ?? oldColumn?.order,
|
order: fieldSchema.order ?? oldColumn?.order,
|
||||||
primaryDisplay: field === primaryDisplay,
|
primaryDisplay: field === primaryDisplay,
|
||||||
|
|
Loading…
Reference in New Issue