Skip to content

Commit

Permalink
fix(core/range): set correct value for range slider when min or max c…
Browse files Browse the repository at this point in the history
…hange
  • Loading branch information
sara-re authored and robzan8 committed Jan 22, 2024
1 parent 3baf2d2 commit 4c5b368
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions projects/core/range/src/range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ export abstract class AjfRange
if (node.name != null) {
this.name = node.name;
}
if (this.instance != null && this.instance.value != null) {
this.value = this.instance.value;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion projects/material/forms/src/range-field.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[max]="end"
[attr.aria-label]="name"
[attr.name]="name"
><input matSliderThumb [value]="ctrl.value" [formControl]="ctrl" /></mat-slider>
><input matSliderThumb [value]="value" [formControl]="ctrl" /></mat-slider>
<div class="ajf-range-label">
<label>{{ctrl.value}}</label>
</div>
Expand Down

0 comments on commit 4c5b368

Please sign in to comment.