mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 16:39:01 +00:00
Fleet UI: Fix dot problem so UI renders responses for columns with dot notation (#19528)
This commit is contained in:
parent
01dd0c7c4d
commit
7a4a3c4939
4 changed files with 4 additions and 3 deletions
1
changes/19528-dot-notation-bug-on-queries
Normal file
1
changes/19528-dot-notation-bug-on-queries
Normal file
|
|
@ -0,0 +1 @@
|
|||
* Fix queries with dot notation in the column name to show results
|
||||
|
|
@ -31,7 +31,7 @@ const generateColumnConfigs = (rows: IWebSocketData[]): IHQRTTableColumn[] =>
|
|||
isSortedDesc={headerProps.column.isSortedDesc}
|
||||
/>
|
||||
),
|
||||
accessor: colName,
|
||||
accessor: (data) => data[colName],
|
||||
Cell: (cellProps: ITableStringCellProps) => {
|
||||
if (typeof cellProps?.cell?.value !== "string") return null;
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ const generateReportColumnConfigsFromResults = (
|
|||
isSortedDesc={headerProps.column.isSortedDesc}
|
||||
/>
|
||||
),
|
||||
accessor: key,
|
||||
accessor: (data) => data[key],
|
||||
Cell: (cellProps: ITableCellProps) => {
|
||||
if (typeof cellProps.cell.value !== "string") return null;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ const generateColumnConfigsFromRows = <T extends Record<keyof T, unknown>>(
|
|||
isSortedDesc={headerProps.column.isSortedDesc}
|
||||
/>
|
||||
),
|
||||
accessor: colName,
|
||||
accessor: (data) => data[colName],
|
||||
Cell: (cellProps: CellProps<T>) => {
|
||||
const val = cellProps?.cell?.value;
|
||||
return !!val?.length && val.length > 300
|
||||
|
|
|
|||
Loading…
Reference in a new issue