From 03131e37927286d1f79a2d1fe76c9943a043a82f Mon Sep 17 00:00:00 2001 From: Yongjie Zhao Date: Mon, 1 Nov 2021 15:58:31 +0000 Subject: [PATCH] fix: datatable crash when column is empty string (#17303) * fix: datatable crash when column is empty string * typo --- .../src/explore/components/DataTableControl/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/explore/components/DataTableControl/index.tsx b/superset-frontend/src/explore/components/DataTableControl/index.tsx index 10c4789c9b77d..d36a31302092d 100644 --- a/superset-frontend/src/explore/components/DataTableControl/index.tsx +++ b/superset-frontend/src/explore/components/DataTableControl/index.tsx @@ -135,7 +135,8 @@ export const useTableColumns = ( key => ({ accessor: row => row[key], - Header: key, + // When the key is empty, have to give a string of length greater than 0 + Header: key || ' ', Cell: ({ value }) => { if (value === true) { return BOOL_TRUE_DISPLAY;