fix: datatable crash when column is empty string (#17303)

* fix: datatable crash when column is empty string

* typo
This commit is contained in:
Yongjie Zhao 2021-11-01 15:58:31 +00:00 committed by GitHub
parent abf24bbb5d
commit 1f2a7a40c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

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