angular / angular/components

bug(Slider): Thumbs positions not updating after start and end value updates in the same time as max attribute

Ouverte
#31,119 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area: material/slider P3
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

### 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

I use the slider as a date range selector. It has 2 possibles ranges, by month or by year.
I give the component an array with every periods and the ranger slider is like an index selector to get min and max value.
I have a first toggle button to help me chose which view to render.
When changing view, the value is updated but both thumbs are not rendered at the right positions.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-f3mseegb?file=src%2Fapp%2Fdate-range%2Fdate-range.component.ts
Steps to reproduce:
1. Click "View per year"
2.Click "View per month"

### Expected Behavior

The thumb should be positioned where the 35 is on the slider

### Actual Behavior

The start value is 35 but the thumb position is 0.

### Environment

- Angular: 19
- CDK/Material: 18
- Browser(s): Arc
- Operating System (e.g. Windows, macOS, Ubuntu): macOS

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz dans src/app/date-range/date-range.component.ts et reproduisez le problème en cliquant sur « View per year », puis sur « View per month ». Examinez comment les valeurs start, end et max du slider évoluent ensemble ; c’est terminé lorsque la valeur start de 35 place le thumb à la position correspondante après le changement de vue.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.