[ToggleButton] Exclusive selection should keep at least one item highlighted
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
When user clicks on the currently highlighted item in <ToggleButtonGroup exclusive>
the highlight dissapears, but the value remains the same as it was before.
Expected behavior 🤔
When user clicks on the currently highlighted item in <ToggleButtonGroup exclusive>
the highlight should stay and the value remains the same as it was before.
Steps to reproduce 🕹
Steps:
- Open the documentation here: https://mui.com/components/toggle-button/#exclusive-selection.
- Click on currently highlighted item.
- Observe how the alignment value doesn’t change, but the highlight is gone.
Context 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
[ToggleButton] Exclusive selection should keep at least one ...
When user clicks on the currently highlighted item in <ToggleButtonGroup exclusive> the highlight should stay and the value remains the same as ...
Read more >ToggleButtons class - material library - Flutter - Dart API docs
Here is an implementation that requires mutually exclusive selection while requiring at least one selection. This assumes that isSelected was properly ...
Read more >How can I require at least one to be selected for angular ...
So, we are using [(ngModel)] to give value to a one variable in .ts <mat-button-toggle-group [(ngModel)]="value" multiple name="fontStyle" ...
Read more >selection - Should a select all toggle button get activated when ...
1. A bit of disadvantage I see with this approach is users can't say whether all are selected or the opposite of it...
Read more >ToggleButton (JavaFX 8) - Oracle Help Center
A ToggleButton is a specialized control which has the ability to be selected. Typically a ToggleButton is rendered similarly to a Button.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chao813 Thank you. I’ve updated formatting as suggested 😃
@mmacu Left a suggested review on your PR. Wording is great, mainly formatting to match other doc’s format.