-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MudSlider no longer accepts nullable types #8860
Comments
@ScarletKuro We talked about this on Discord and I wanted to get it tracked here for discussion |
@henon What do you think? I'm using this in a production app which is why I made the issue. |
I think this is an accidental break and the easiest way would be to revert to using the numeric converter. It is true, we support nullable types in all inputs, so the slider shouldn't be an exception to that |
Personally to me, that the component doesn't override the setters / getters with the converters anymore overweight the nullable feature (which makes the component to be "stable" and correctly designed) considering that there is a reasonable workaround available to understand that the value wasn't selected and personally to me it seems that the component author didn't even intend the nullable usage as the slider position is inadequate when the the value is |
It is a good question where the slider knob should be in case of Can we somehow find a compromise? Like a way to define the not-set value (i.e. -1 or -infinity or whatever)? Maybe |
I know that angular has the knob in the begging when the value is
That's what I suggested as a workaround and meant under "reasonable workaround" if you set the initial value less that your min, lets say -1 value and min 0, the knob will be in beginning and once you start moving know value will be positive and never reach the negative value again. |
FluentUI uses generic math as well as far as I can see.
But |
Do you think it's a good time to make it a
You're right, I checked and I did that binding a different way. |
My answer that it should like in Radzen, but the time is not good. Not unless |
Introducing a |
Bug type
Component
Component name
MudSlider
What happened?
I have a form which the user fills out that tracks the amount of sleep they got which is stored in a
decimal?
.A
null
state indicates that the user has not made a selection yet. If this was a non-nullable decimal then you would not be able to tell the difference between0
meaning no choice and0
meaning no sleep.Expected behavior
MudSlider should be able to handle nullable types again like
Reproduction link
https://try.mudblazor.com/snippet/QaGSETaHbgFnzVTr
Reproduction steps
decimal?
propertyRelevant log output
No response
Version (bug)
7.0.0-preview1
Version (working)
6.19.1
What browsers are you seeing the problem on?
Edge
On which operating systems are you experiencing the issue?
Windows
Pull Request
Code of Conduct
The text was updated successfully, but these errors were encountered: