# Feature DREAM-495 - Allow single selection variant for the (filterable) tree view

Project: Stream Design System
Status: closed
URL: https://community.openproject.org/work_packages/DREAM-495

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Target versions | 16.6.0 |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Frontend components and Primer design system |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Henriette Darge |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**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 &quot;include subitems&quot; option.
        
    *   hide the segmentedControl
        

**Technical notes**

*   Should we consider of NOT showing checkboxes? Should we maybe reuse the `current` state for the selection?
