Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 638be65

Browse files
fix(material/slider): avoid updating tick marks unnecessarily (#26322)
1 parent 6f92144 commit 638be65

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/material/slider/slider.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ export class MatSlider
797797

798798
/** Updates the width of the tick mark track. */
799799
private _updateTickMarkTrackUI(): void {
800-
if (this._skipUpdate()) {
800+
if (!this.showTickMarks||this._skipUpdate()) {
801801
return;
802802
}
803803

@@ -883,7 +883,12 @@ export class MatSlider
883883

884884
/** Updates the dots along the slider track. */
885885
_updateTickMarkUI(): void {
886-
if (this.step === undefined || this.min === undefined || this.max === undefined) {
886+
if (
887+
!this.showTickMarks ||
888+
this.step === undefined ||
889+
this.min === undefined ||
890+
this.max === undefined
891+
) {
887892
return;
888893
}
889894
const step = this.step > 0 ? this.step : 1;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /