Commit 80a6bfb
fix(material/slider): unable to assign min/max values if they are more precise than then step (#21155)
We have some logic that trims the value to the same number of decimals as the `step`,
in order to avoid assigning long decimal values. The problem is that if the `min` or `max`
are more precise than the `step`, we round up just above the `min` or below the `max`,
preventing the user from reaching the end values.
These changes add an exception to the rounding for the `min` and `max` values.
Fixes #21147.
(cherry picked from commit e95edad)1 parent 3194a3e commit 80a6bfb
2 files changed
+26
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
394 | 417 | | |
395 | 418 | | |
396 | 419 | | |
| |||
1510 | 1533 | | |
1511 | 1534 | | |
1512 | 1535 | | |
1513 | | - | |
| 1536 | + | |
1514 | 1537 | | |
1515 | 1538 | | |
1516 | 1539 | | |
1517 | 1540 | | |
1518 | 1541 | | |
| 1542 | + | |
1519 | 1543 | | |
1520 | 1544 | | |
1521 | 1545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| |||
0 commit comments