Skip to content

Commit

Permalink
fix(material/slider): resolve duplicate key warnings (#29073)
Browse files Browse the repository at this point in the history
Fixes that the slider was logging a bunch of warnings because we were using duplicated keys to render out the tick marks.
  • Loading branch information
crisbeto committed May 20, 2024
1 parent d25460d commit 4f43793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/material/slider/slider.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@if (showTickMarks) {
<div class="mdc-slider__tick-marks" #tickMarkContainer>
@if (_cachedWidth) {
@for (tickMark of _tickMarks; track tickMark; let i = $index) {
@for (tickMark of _tickMarks; track i; let i = $index) {
<div
[class]="tickMark === 0 ? 'mdc-slider__tick-mark--active' : 'mdc-slider__tick-mark--inactive'"
[style.transform]="_calcTickMarkTransform(i)"></div>
Expand Down

0 comments on commit 4f43793

Please sign in to comment.