Bugfix
(User-visible)
Detail
#27617
Scroll position in Tree-Grid after action "expand all" is undefined
If you expand all nodes in a scrolled tree grid, you might expect to still see some of what you saw before. Instead, the view scrolls almost to the end.
Implementation
Selected nodes are still displayed in the viewport by the actions "Collapse all", "Expand all" and "Sort column" (usually in the middle, because either rows are added, removed or reordered).
If no node is selected, the current viewport state is kept. By "Expand all" further rows are added to the table in general. The previously first row of the viewport remains the first row after expansion of all nodes.
Test
Generate "large" amount of demo data (e.g. 1000 A's).
In a tree table and TreeGrid scroll down the first 200 rows and then test the following:
- Expand the last visible node. The subtree of the node should then be displayed in the viewport. Collapsing the node should hide the subtree only.
- Select the row and execute the command "Expand all" via the Burger menu. The selected node should still be displayed in the viewport (usually in the center). Execute the command "Collapse all". The selected node should still be displayed in the viewport.
- Execute the command "Expand all". The first line of the old viewport should still be the first line of the "new" viewport. Execute the command "Collapse all". The first row of the old viewport should still be the first row of the "new" viewport.