You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(mat-slider): Max value not updating correctly when new value is 0 #23913
P4A relatively minor issue that is not relevant to core functionsarea: material/slidergood first issueLabel noting a good first issue to be worked on by a community memberhelp wantedLabel noting an issue which the team is looking for contribution from the community to fix
Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
I am changing slider's max value in my component while/after doing some works. And it seems it has a problem updating visually when new max value is 0.
Confirmed that the ticks do not update after setting the max to zero. This actually happens both in the current and MDC-based slider (which is impressive because they're completely different implementations).
@DMezhenskyi PLZ Let me know, if you are still going to work on this issue and I'll close my PR :)
Hi @lukonik! If this fix is urgent then I do not mind if your solution eventually will be merged. My fix is ready, however, I can deliver my PR in about 3 weeks when I get back from vacation.
P.s from what I remember in my solution, besides the case you covered in your PR, there is also a method _updateTickIntervalPercent where happens division by zero if min and max values are the same. If it happens, the result of the calculation will be “Infinity” which is not a valid CSS value for the tick’s background-size property, so it is also a cause of wrongly repainted ticks.
@DMezhenskyi PLZ Let me know, if you are still going to work on this issue and I'll close my PR :)
Hi @lukonik! If this fix is urgent then I do not mind if your solution eventually will be merged. My fix is ready, however, I can deliver my PR in about 3 weeks when I get back from vacation.
P.s from what I remember in my solution, besides the case you covered in your PR, there is also a method _updateTickIntervalPercent where happens division by zero if min and max values are the same. If it happens, the result of the calculation will be “Infinity” which is not a valid CSS value for the tick’s background-size property, so it is also a cause of wrongly repainted ticks.
Hey, thx for your reply.
it's not urgent at all, for me at least :). I'll close my PR then and feel free to push your one .
P4A relatively minor issue that is not relevant to core functionsarea: material/slidergood first issueLabel noting a good first issue to be worked on by a community memberhelp wantedLabel noting an issue which the team is looking for contribution from the community to fix
Activity
jelbourn commentedon Nov 18, 2021
Confirmed that the ticks do not update after setting the max to zero. This actually happens both in the current and MDC-based slider (which is impressive because they're completely different implementations).
DMezhenskyi commentedon Nov 30, 2021
Hi! Is anybody working on it? Otherwise I could try to fix it if you don’t mind
jelbourn commentedon Dec 9, 2021
@DMezhenskyi Feel free to send a PR
lukonik commentedon Dec 27, 2021
@DMezhenskyi PLZ Let me know, if you are still going to work on this issue and I'll close my PR :)
lukonik commentedon Dec 27, 2021
Apologize for so many closed PRs had some troubles with source control.
DMezhenskyi commentedon Dec 27, 2021
Hi @lukonik! If this fix is urgent then I do not mind if your solution eventually will be merged. My fix is ready, however, I can deliver my PR in about 3 weeks when I get back from vacation.
P.s from what I remember in my solution, besides the case you covered in your PR, there is also a method _updateTickIntervalPercent where happens division by zero if min and max values are the same. If it happens, the result of the calculation will be “Infinity” which is not a valid CSS value for the tick’s background-size property, so it is also a cause of wrongly repainted ticks.
lukonik commentedon Dec 28, 2021
Hey, thx for your reply.
it's not urgent at all, for me at least :). I'll close my PR then and feel free to push your one .
fix(material/slider): Ticks updated wrongly if the max property 0 (#2…
fix(material/slider): Ticks updated wrongly if the max property 0 (#2…
angular-automatic-lock-bot commentedon Feb 28, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(material/slider): Ticks updated wrongly if the max property 0 (an…