bug(MatSlider): "showTickMarks" cash if updating mat-slider from api callback
- 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 have problem with Range slider when i need to get min, max from an API call. The console show no error but my app just freeze completely. If i remove [showTickMarks], problem solved !
slider.html
``
``
slider.ts
``
soldeMin: number = 0;
soldeMax: number = 3000;
ngOnInit(): void {
this.api.get().subscribe(res => {
this.soldeMin = res.solde_min;
this.soldeMax = res.solde_max;
})
}
``
### Reproduction
StackBlitz link: [https://stackblitz.com/edit/qifxvd?file=src%2Fexample%2Fslider-range-example.ts,src%2Fexample%2Fslider-range-example.html,src%2Fexample%2Fslider-range-example.css](https://github.com/angular/components/issues/url)
Steps to reproduce:
1.
2.
### Expected Behavior
App not freeze
### Actual Behavior
App freeze
### Environment
- Angular: 16.2.0
- CDK/Material: 16.2.8
- Browser(s): Edge, Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dai file StackBlitz src/example/slider-range-example.ts, src/example/slider-range-example.html e src/example/slider-range-example.css, quindi confrontali con la configurazione segnalata di slider.html e slider.ts. Riproduci un callback API che aggiorni min e max mentre showTickMarks è abilitato; il lavoro è completato quando l’app rimane reattiva e il range slider si aggiorna correttamente.
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
- 35/100