Skip to content

PF4 Table: Cannot read property 'title' of null #1371

@dlabrecq

Description

@dlabrecq

It appears that the table generates a Cannot read property 'title' of null error if any cells are null or undefined.

Appears to be generated from this line of Body.js?
https://github.com/patternfly/patternfly-react/blob/master/packages/patternfly-4/react-table/src/components/Table/Body.js#L51

@karelhala This may interest you? My work around was to ensure item.label is not null. Not sure how this is related to the property 'title', but was quite difficult to debug.

rows.push({
  cells: [
    item.label ? item.label : '', <<<<
    this.getMonthOverMonthCost(item, index),
    this.getTotalCost(item, index),
  ],
...

screen shot 2019-02-11 at 10 07 06 pm

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions