fix(table-charts): Prevent time grain from altering Raw Records in Tables + Interactive Tables (#37561)

This commit is contained in:
Levis Mbote
2026-02-19 12:24:09 +03:00
committed by GitHub
parent 6b80135aa2
commit c175346808
6 changed files with 439 additions and 9 deletions

View File

@@ -356,8 +356,13 @@ export default function TableChart<D extends DataRecord = DataRecord>(
);
const timestampFormatter = useCallback(
value => getTimeFormatterForGranularity(timeGrain)(value),
[timeGrain],
(value: DataRecordValue) =>
isRawRecords
? String(value ?? '')
: getTimeFormatterForGranularity(timeGrain)(
value as number | Date | null | undefined,
),
[timeGrain, isRawRecords],
);
const [tableSize, setTableSize] = useState<TableSize>({
width: 0,