Skip to content

ToggleGroupSimple/ToggleGroup (single) has no way to prevent deselecting the active item #319

Description

@aks07

With type="single", clicking the already-selected item deselects it and fires onChange('') (Radix onItemDeactivatesetValue('')). For a segmented control / view switcher, exactly one option must always remain selected, but there's no prop to enforce this. Consumers have to guard onChange against'.

Expected: a required / disableDeselect option (single mode) that keeps one item always selected.
Workaround: ignore the empty value in onChange.

Screen.Recording.2026-07-02.at.4.15.06.PM.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions