enhancement
The current tree selection logic is not optimal because it only refers to individual rows. A row is either selected or not - it is not possible to see whether there are other selected rows under a collapsed row.
The logic should be extended so that the following states are recognizable in a tree table with multiple selection at the selection marker:
- Neither the node nor any of the children (recursive) is selected.
- Only the node, but none of the children (recursive) is selected.
- The node is not selected, but some of the children (recursive) are selected.
- The node is selected and some but not all of the children (recursive) are selected.
- The complete subtree is selected (the node and all of its children (recursive)).
A click on the selection marker for the following status transitions:
- Background represents the children and children's children white, gray, black - none, do, all
- Plunger in the middle represents the node itself - filled, or empty - selected or not selected
Consideration:
- When selecting, the node itself is selected first and then (when clicking again) the entire subtree (if it did not previously contain a selected node) - careful selection.
- A completely selected subtree can be deselected with a single click.
- If other selections already exist in the subtree, these are not overwritten - a click only switches between the selection of the clicked node.
- There could be the additional context menu commands
- Select all (regardless of the state in the subtree)
- Deselect all (regardless of the state in the subtree)
- 1, 2, 3,... Select levels.
Conversion
Display with "standard icons":