Logs Panel: Table UI - better default column spacing (#82205)

* add default width to time fields in logs table
This commit is contained in:
Galen Kistler 2024-02-12 09:35:03 -06:00 committed by GitHub
parent 8f36f905ee
commit c4b869790a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}