feat(fe): support explicit relative flex ratios per grid column

This commit is contained in:
2026-08-15 21:30:13 +09:00
parent f9f05a2318
commit a239e6ab64
3 changed files with 10 additions and 9 deletions
@@ -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