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.

MudSwitchM3 style is broken when typeparam is bool?

See original GitHub issue

When 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:closed
  • Created 2 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mckaragozcommented, Aug 12, 2023

Thanks for the idea. With new release, null and false states looks same.

0reactions
marcoatribeirocommented, Jul 29, 2023

I just performed a test and it seems that, for MudSwitch, both null and false states have the same look.

https://try.mudblazor.com/snippet/cOmdErmDINbILUik

Read more comments on GitHub >

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

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