6.5.3 & 6.5.2, Working as of 6.5.1
The table does not render when you have a configuration with pivoted columns that are not grouped and aggregated columns which are grouped. If all columns are grouped, three is no issue.
Uncaught TypeError: Cannot read property 'Header' of undefined
let PivotParentColumn = pivotColumns.reduce(
(prev, current) =>
prev && prev === current.parentColumn && current.parentColumn,
pivotColumns[0].parentColumn
)
let PivotGroupHeader = hasHeaderGroups && PivotParentColumn.Header
PivotGroupHeader = PivotGroupHeader || (() => <strong>Pivoted</strong>)
Broken (6.5.3): _Notice that first and last name are not grouped_
https://codesandbox.io/s/wyvor42vw
Working (6.5.3) _Notice that first and last name are now grouped_
https://codesandbox.io/s/n780jz8600
Working (6.5.1): _First and last name are not grouped, but the table is still working_
https://codesandbox.io/s/l599vz8277
This should be fixed in the latest version
It seems this was never fixed. I tried with every version from 6.5.2 to 6.7.6 and it's not working.
It won't currently work with the code provided by scrawfor because it defines parents for every column except the pivoted ones. If no columns have parents, it works.
Still not working. Considering a fork as this is mission-critical.
I am having this issue as well. Is there a solution?
When I add a pivot (in version 6.8.2), I get:
methods.js:189 Uncaught TypeError: Cannot read property 'Header' of undefined
at ReactTable.getDataModel (methods.js:189)
at ReactTable.componentWillReceiveProps (lifecycle.js:61)
at callComponentWillReceiveProps (react-dom.development.js:6892)
at updateClassInstance (react-dom.development.js:7132)
at updateClassComponent (react-dom.development.js:8345)
at beginWork (react-dom.development.js:8982)
at performUnitOfWork (react-dom.development.js:11814)
at workLoop (react-dom.development.js:11843)
at HTMLUnknownElement.callCallback (react-dom.development.js:100)
at Object.invokeGuardedCallbackDev (react-dom.development.js:138)
This is not fixed, workaround is to put pivoted column into a header group as well.
Most helpful comment
I am having this issue as well. Is there a solution?
When I add a pivot (in version 6.8.2), I get: