Skip to content

Commit

Permalink
fix: datatable crash when column is empty string (#17303)
Browse files Browse the repository at this point in the history
* fix: datatable crash when column is empty string

* typo
  • Loading branch information
zhaoyongjie authored and AAfghahi committed Jan 10, 2022
1 parent 5561c88 commit 03131e3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 03131e3

Please sign in to comment.