react-data-grid
react-data-grid copied to clipboard
Cannot read properties of undefined (reading 'parent')
Describe the bug
I have been getting occasional errors logged to my bug tracker for an exception from react-data-grid, but I have been unable to reproduce the issue no matter what I have tried.
Keyboard navigation works for me in every complex case I can figure out.
Cannot read properties of undefined (reading 'parent')
TypeError: Cannot read properties of undefined (reading 'parent')
File "../../../node_modules/react-data-grid/lib/bundle.js", line 227, in n$e
let parent = nextColumn.parent;
File "../../../node_modules/react-data-grid/lib/bundle.js", line 2531, in Gt
const nextSelectedCellPosition = getNextSelectedCellPosition({
File "../../../node_modules/react-data-grid/lib/bundle.js", line 2278, in vr
navigate(event);
// src/utils/selectedCellUtils.ts
if (nextRowIdx < mainHeaderRowIdx) {
const nextColumn = columns[nextIdx]; // This appears to return undefined
let parent = nextColumn.parent; // error happens here
...
}
- Do you have any idea on what might be causing this?
- Would it be possible to defend against this exception by making sure that
nextColumnis not undefined?
Environment
react-data-gridversion:7.0.0-beta.41react/react-domversion:18.2.0
All errors from bug tracker have been on Chrome and have happened on both windows and OSX, so I don't think is is OS related.