question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ToggleButton] Exclusive selection should keep at least one item highlighted

See original GitHub issue

Duplicates

  • 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:

  1. Open the documentation here: https://mui.com/components/toggle-button/#exclusive-selection.
  2. Click on currently highlighted item.
  3. 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:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
mmacucommented, Nov 21, 2021

@chao813 Thank you. I’ve updated formatting as suggested 😃

0reactions
chao813commented, Nov 21, 2021

@mmacu Left a suggested review on your PR. Wording is great, mainly formatting to match other doc’s format.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found