angular / angular/components

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

Aperta
#31,119 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area: material/slider P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con la riproduzione StackBlitz in src/app/date-range/date-range.component.ts e riproduci il problema facendo clic su “View per year” seguito da “View per month”. Esamina come cambiano insieme i valori start, end e max dello slider; il lavoro è completato quando il valore start di 35 posiziona il thumb nella posizione corrispondente dopo il cambio di vista.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.