minor
defect
major
minor
If a tree is displayed in a tree table (TreeTableComponent) or a tree (TreeComponent), a node is selected, and the view is then rebuilt using the "Refresh" (invalidate) function, the selection of that node is lost. Instead of reselecting the previously selected node, the default selection is restored.
With #29330, it was already achieved that the expansion state of the tree nodes (expanded, collapsed) is preserved across an `invalidate` operation. Similarly, the selection of a tree node should also be preserved through an `invalidate` call or—if the previously selected node still exists in the rebuilt tree—restored.
Cause (TreeTableComponent): During an `invalidate`, the selection model is cleared in ` clearTreeTableField() ` using `_selectionModel.clear()`. Since the component’s selection listener is active during this process, the empty selection is written to the selection channel, causing the previously saved selection to be lost and the default selection to take effect when the tree is rebuilt.