You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With type="single", clicking the already-selected item deselects it and fires onChange('') (Radix onItemDeactivate → setValue('')). 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.
With
type="single", clicking the already-selected item deselects it and firesonChange('')(RadixonItemDeactivate→setValue('')). 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