angular / angular/components

bug(MatStepper): MatStep’s `completed` should be a 2 way binding

Aperta
#20,215 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area: material/stepper feature G needs: discussion P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### Reproduction

https://stackblitz.com/edit/angular-zxzjbv

Steps to reproduce:
The goal is to load a stepper, where some steps are (conditionally) pre-completed.

For example: Step2: Complete, Step3: Not Complete

1. Create a stepper, with multiple steps. Each step has a "completed" binding to a variable.
2. Set some of these bindings to true, and others to false.
3. “Walk” to step 2, step 3, then back to step 2 and step 1.

#### Expected Behavior

Step 3 should now be complete.

#### Actual Behavior

Step 3 is not complete, and is hard locked into a completed=false state.

#### Requests

Each step should have a `(completed)` output even. For 2 reasons:

1. We can have a 2 way binding with initial state. Eg:

```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with the linked StackBlitz reproduction and inspect the MatStepper and MatStep component entry points in the Angular Material source. Reproduce the conditional completion behavior, then trace how the completed binding is handled when navigating between steps. Done means completion can be initialized and observed through the requested binding without the visible reset described in the issue.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.