Content
View differences
Updated by Henriette Darge 8 months ago
**As** a developer
**I want to** restrict the selection mode of the tree view to single select
**so that** I can use the tree view for hierarchical selections, where only a single selection is allowed.
**Acceptance criteria**
**TreeView**
* There is a new `select_variant` called `single`
* This variant alows only one item to be selected
* If the tree view is set to single select and a user selects another item, the previous selected one must get deselected.
* The Tree View is still submittable via a form (submitting only one value)
* In single-select mode, remove the possibility of adding the trailing icon.
* Instead, use that slot to indicate current select with a ✔ icon.
**FilterableTreeView**
* If the tree view is set to single select, the filterable tree view must
* hide the "include subitems" option.
* hide the segmentedControl
**Technical notes**
* Should we consider of NOT showing checkboxes? Should we maybe reuse the `current` state for the selection?
**I want to** restrict the selection mode of the tree view to single select
**so that** I can use the tree view for hierarchical selections, where only a single selection is allowed.
**Acceptance criteria**
**TreeView**
* There is a new `select_variant` called `single`
* This variant alows only one item to be selected
* If the tree view is set to single select and a user selects another item, the previous selected one must get deselected.
* The Tree View is still submittable via a form (submitting only one value)
* In single-select mode, remove the possibility of adding the trailing icon.
* Instead, use that slot to indicate current select with a ✔ icon.
**FilterableTreeView**
* If the tree view is set to single select, the filterable tree view must
* hide the "include subitems" option.
* hide the segmentedControl
* Should we consider of NOT showing checkboxes? Should we maybe reuse the `current` state for the selection?