ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Internal issue 2759 - ic-data-table#createCells() throws on null data value

Open ticket-sync[bot] opened this issue 1 year ago • 1 comments

The createCells() function of the ic-data-table component throws an error when null is passed as a cell value through the table’s data prop. This is due to an incomplete type check when calculating the hasIcon variable (it uses this.isObject() which only checks for a typeof value of “object”, which is also produced by null). When the subsequent code then tries to run Object.keys() on null, the function throws a TypeError and the whole table fails to render.

Consider what a null value looks like in a cell - do we still throw a warning? Write tests.

ticket-sync[bot] avatar May 30 '24 07:05 ticket-sync[bot]

confirmed that this is still an issue

ad9242 avatar Jul 17 '24 10:07 ad9242

I believe that I have resolved this in the following PR: https://github.com/mi6/ic-ui-kit/pull/2962

dn55533 avatar Jan 10 '25 13:01 dn55533