MudSwitchM3 style is broken when typeparam is bool?
See original GitHub issueWhen MudSwitchM3 is created with T="bool?"
, the toggle button color is not set correctly, as the class mud-switch-thumb-...-m3
is not set in the span
element.
The issue seems to be in the below line in MudSwitchM3.razor file.
<span class="mud-switch-thumb-m3 @(BoolValue == false ? $"mud-switch-thumb-{Color.ToDescriptionString()}-m3" : null) @(string.IsNullOrEmpty(ThumbOffIcon) ? null : "mud-switch-thumb-off-icon-m3") d-flex align-center justify-center">
Issue Analytics
- State:
- Created 2 months ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Switch
Similar to a checkbox but visually different, the switch lets the user switch between two values with the tap of a button. API....
Read more >How to set default type @typeparam TValue = bool in ...
This is a known issue https://github.com/dotnet/aspnetcore/issues/13619. but work around I do in a project is
Read more >Mudblazor color enum. SvgIcons - defines the ISvgIcon interface
Hi, I am having a trouble to bind nullable enum or boolean values with MudSwitch and MudSelect. But in MudLink's documentation says for...
Read more >Mudblazor date and time picker. It creates a dropdown menu f
Mudblazor date and time picker. It creates a dropdown menu from which a user can select a range of dates. org mudblazor. Much...
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
Thanks for the idea. With new release,
null
andfalse
states looks same.I just performed a test and it seems that, for MudSwitch, both
null
andfalse
states have the same look.https://try.mudblazor.com/snippet/cOmdErmDINbILUik