Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

bug(mat-slider): Incorrect slider thumb position when changing min/ max and form value

オープン
#32,521 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
angular, typescript
領域
frontend

調査の方向性

src/main.ts の StackBlitz reproduction から始め、reactive form、バインドされた min/max 値、mat-slider を使ってカテゴリの変更を再現します。min/max と setValue の変更後に slider がどのように thumbs を更新するかを調べます。Category B を選択した後、フォームの値と一致する [5, 15] に slider 1 の thumbs が表示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

area: material/slider P3
Is this a regression?
  • Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was

No response

Description

A range slider is bound to a reactive form using formControlName; min/ max properties are also bound.
After programmatically updating min/ max variables and calling setValue to update the form values, observed behaviour is that range slider thumbs don't match the form values. Expected behaviour is that thumb positions match the calls to setValue.

https://github.com/user-attachments/assets/3bb7de78-5d05-436d-90ac-f1288fac8a32

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-xwmbwzkn?file=src%2Fmain.ts
Steps to reproduce:

  1. Select Category A (this sets ranges to be [10, 20] + [20, 30], and absolute min/ max to be [10, 30])
  2. Select Category B (this sets ranges to be [5, 15] + [15, 25], and absolute min/ max to be [5, 25])
  3. Hover over 1st slider's thumbs
Expected Behavior

Expected slider 1's thumbs to be at [5, 15] (to match form values after having called setValue)

Actual Behavior

Observed slider 1's thumbs to be at [10, 15] (which doesn't match form values)

Environment
  • Angular: 20.3.15
  • CDK/Material: 20.2.14
  • Browser(s): Chrome Version 143.0.7499.41 (Official Build) (64-bit)
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
3日 7時間
マージ済み PR(30日)
59

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

angular/components のほかの issue

angular/components の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。