mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -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: {
|
||||
inspect: true,
|
||||
filterable: true, // This sets the columns to be filterable
|
||||
width: getInitialFieldWidth(field),
|
||||
...field.config.custom,
|
||||
},
|
||||
// This sets the individual field value as filterable
|
||||
@ -252,3 +253,10 @@ function getLabelFiltersTransform(labelFilters: Record<string, number>) {
|
||||
}
|
||||
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