Hi,
We are getting an error in the console when deleting rows at the top and bottom of a large dataset in a tree grid.
Using the "Tree Grid demo" we are generating a large amount of tree data using the following snippet:
const data = [];
for (let i = 0; i < 50; i++) {
const parent = new Gate({name: 'Parent', children: []});
for (let j = 0; j < 50; j++) {
const child = new Gate({name: 'Child', children: []});
parent.appendChild(child);
for (let k = 0; k < 50; k++) {
const grandchild = new Gate({name: 'Grandchild'});
child.appendChild(grandchild);
}
}
data.push(parent);
}
The reproduction steps are:
- Expand all rows in the grid
- Select the top parent row and the bottom child (total 2 rows selected)
- Call
tree.store.remove(tree.selectedRecords)
to remove the selected rows
You get the following error in the console:
Uncaught TypeError: Cannot read properties of undefined (reading 'id')
at RowManager.getOffsetHeight (grid.module.js?458960:53:9633)
at RowManager.calculateTop (grid.module.js?458960:53:10497)
at RowManager.correctError (grid.module.js?458960:53:17756)
at RowManager.updateRenderedRows (grid.module.js?458960:53:17291)
at TreeGrid.<anonymous> (grid.module.js?458960:53:131872)
at TreeGrid.<anonymous> (grid.module.js?458960:10:241253)
at grid.module.js?458960:10:240747