feat(fe): support explicit relative flex ratios per grid column
This commit is contained in:
@@ -50,6 +50,7 @@ export interface UiGridColumn {
|
||||
header: string
|
||||
width?: number
|
||||
minWidth?: number
|
||||
flex?: number
|
||||
sortable?: boolean
|
||||
filterable?: boolean
|
||||
sensitive?: boolean
|
||||
|
||||
@@ -12,8 +12,8 @@ const columnDefs = computed<ColDef[]>(() => props.columns.map(column => ({
|
||||
field: column.field,
|
||||
headerName: column.header,
|
||||
width: column.width,
|
||||
minWidth: column.minWidth ?? 100,
|
||||
flex: column.width ? undefined : 1,
|
||||
minWidth: column.minWidth ?? 80,
|
||||
flex: column.flex ?? (column.width ? undefined : 1),
|
||||
sortable: column.sortable ?? true,
|
||||
filter: column.filterable ?? true,
|
||||
valueFormatter: column.formatter ? params => column.formatter?.(params.value, params.data) ?? '' : undefined
|
||||
|
||||
Reference in New Issue
Block a user