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 Nov 1, 2021
1 parent abf24bb commit 1f2a7a4
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 1f2a7a4

Please sign in to comment.