Tree Item Picker: Make table rows and cards with children navigable in pickers during selection - #23593
Conversation
Adjusts selection behavior so items with children remain navigable while selection is active. The table now distinguishes `selection-mode` from `select-only` and supports per-row `selectOnly` overrides, letting tree rows opt out when needed. Tree table mapping and default tree item cards now explicitly prevent `select-only` on child items, and new/updated tests cover these selection-mode edge cases.
|
Claude finished @madsrasmussen's task in 5m 10s —— View job PR ReviewTarget: Separates visual selection state (
Suggestions
Approved with Suggestions for improvementGood to go, but please carefully consider the importance of the suggestions. |
There was a problem hiding this comment.
Pull request overview
This PR adjusts picker selection behavior so tree items with children remain navigable while selection is active, by separating “selection mode” (show selection affordances) from “select-only” (disable row/card interaction) and allowing per-row overrides.
Changes:
- Add per-row
selectOnlyoverride onUmbTableItemand introduceselection-modevsselect-onlyon table rows. - Ensure tree table rows and default tree item cards never become
select-onlywhen the item has children, preserving drill-in navigation. - Add/extend component tests to cover the new selection-mode/select-only edge cases.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Umbraco.Web.UI.Client/src/packages/core/tree/view/table/table-tree-view.element.ts | Maps tree items to table rows and opts items with children out of select-only. |
| src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item-card/default/default-tree-item-card.element.ts | Prevents select-only on cards with children while selection is active. |
| src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item-card/default/default-tree-item-card.element.test.ts | New tests for tree item card select-only behavior (needs a small fix to the test double API). |
| src/Umbraco.Web.UI.Client/src/packages/core/components/table/table.element.ts | Introduces selection-mode attribute and per-row selectOnly override, keeping checkbox UI in selection mode while allowing interaction when opted out. |
| src/Umbraco.Web.UI.Client/src/packages/core/components/table/table.element.test.ts | Adds tests verifying row-level opt-out from select-only while remaining in selection mode. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
AndyButland
left a comment
There was a problem hiding this comment.
Looks good and works as expected @madsrasmussen. I can see the problem where selecting an item would previously block navigating down into the children via the table and card views. With this PR in place that's no longer a concern. I can select from various levels in the tree and all works as expected.
Approving with a couple of minor comments for you to consider before merging.
|



Adjusts selection behavior so items with children remain navigable while selection is active. The table now distinguishes
selection-modefromselect-onlyand supports per-rowselectOnlyoverrides, letting tree rows opt out when needed. Tree table mapping and default tree item cards now explicitly preventselect-onlyon child items, and new/updated tests cover these selection-mode edge cases.How to test
Currently, only the Document Type Picker has tree views enabled. You will see one when creating a new package in the package section.
Make sure that your Document Types are organized into folders so the picker has something to navigate.
Ensure that it is possible to navigate into an item from all views (tree, table, cards) when a selection is in progress.