mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Logs Panel: Table UI - better default column spacing (#82205)
* add default width to time fields in logs table
This commit is contained in:
parent
8f36f905ee
commit
c4b869790a
@ -80,6 +80,7 @@ export function LogsTable(props: Props) {
|
|||||||
custom: {
|
custom: {
|
||||||
inspect: true,
|
inspect: true,
|
||||||
filterable: true, // This sets the columns to be filterable
|
filterable: true, // This sets the columns to be filterable
|
||||||
|
width: getInitialFieldWidth(field),
|
||||||
...field.config.custom,
|
...field.config.custom,
|
||||||
},
|
},
|
||||||
// This sets the individual field value as filterable
|
// This sets the individual field value as filterable
|
||||||
@ -252,3 +253,10 @@ function getLabelFiltersTransform(labelFilters: Record<string, number>) {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getInitialFieldWidth(field: Field): number | undefined {
|
||||||
|
if (field.type === FieldType.time) {
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user