ToggleGroup: add an option to prevent empty selected items
vladstudio opened this issue · comments
Vlad Gerasimov commented
Description
See the demo at https://ark-ui.com/docs/components/toggle-group – the first button is initially selected, but if you click it, it becomes unselected. In other words, the component value becomes []
.
Can it become an optional behaviour? I expected one item to be always selected by default: clicking a selected item would do nothing.
Link to Reproduction (or Detailed Explanation)
https://ark-ui.com/docs/components/toggle-group
Steps to Reproduce
- Go to https://ark-ui.com/docs/components/toggle-group
- Note how the first button is selected
- Click it
- The ToggleGroup now has zero selected items
Ark UI Version
latest (2.2.3)
Framework
- React
- Solid
- Vue
Browser
Chrome
Additional Information
No response