mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
Fixes datatable crash when dimension is empty (#20680)
Fixes #20679 Co-authored-by: Usiel Riedl <usiel.riedl@automattic.com>
This commit is contained in:
@@ -314,9 +314,9 @@ export const useTableColumns = (
|
||||
const isOriginalTimeColumn =
|
||||
originalFormattedTimeColumns.includes(key);
|
||||
return {
|
||||
id: key,
|
||||
// react-table requires a non-empty id, therefore we introduce a fallback value in case the key is empty
|
||||
id: key || index,
|
||||
accessor: row => row[key],
|
||||
// When the key is empty, have to give a string of length greater than 0
|
||||
Header:
|
||||
colType === GenericDataType.TEMPORAL &&
|
||||
typeof firstValue !== 'string' ? (
|
||||
|
||||
Reference in New Issue
Block a user