angular / angular/components

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

Abierto
#31,119 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area: material/slider P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción de StackBlitz en src/app/date-range/date-range.component.ts y reproduce el problema haciendo clic en “View per year” y, después, en “View per month”. Inspecciona cómo cambian conjuntamente los valores start, end y max del slider; estará terminado cuando el valor start de 35 coloque el thumb en la posición correspondiente después de cambiar de vista.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.