Open AndrewT-TitaniumSolutions opened 7 years ago
I would guess some combination of 3cd8120 and 3cd8120 fix this, but not all the way back to 0.3.x unfortunately. It would be worth updating to master and seeing if that fixes the issue for you.
Unfortunately we have some heavily customized object stores we use with dgrid so migrating to dstore to use a newer dgrid is a non-trivial exercise. I have worked around the issue (by forcing a grid refresh to collapse the tree) which is sufficient for our purposes at the moment.
I did give the current master a try and there is still an issue. Adding minRowsPerPage: 2,
into one of the grid definitions on the included tree.html test page still triggers the issue, though the placeholder rows will fill in once you expand enough nodes.
Sure, though dstore does provide an adapter that makes it simply a wrapper around a dojo/store which might help. Regardless, understood. And we will look into the use case you've provided against master as well...
If you have at least three top level entries in your tree and the first and last entries have more than minRowsPerPage children but one of the other entries has less than minRowsPerPage children then when a column is sorted not all entries are displayed. If all entries have either more or less than minRowsPerPage children then things work as expected.
We are using dgrid 0.3.12 so I initially though this was related to #701 or #714 as we are backing the grid with an Observable store, but upgrading to 0.3.17 has not fixed the issue and there are no errors or warnings in the console.
What appears to be happening is that the grid queries the store for minRowsPerPage items for each parent element and once those are drawn the
_processScroll
function tries to fill in the remaining values from the bottom of the grid upwards. After the smaller parent element has had it's children rendered the remaining items havepreload.count
set to 0 which is preventing more items being rendered.I have managed to reproduce the issue by altering the tree test page, javascript inline below, though it has slightly different behavior to what we are seeing in production (the rendering is broken from the initial load rather than only after sorting a column).