angular / angular/components

Linear stepper behaving weird when going back a step

Ouverte
#8,948 5 commentaires 3 réactions 0 personnes assignées Voir sur GitHub
area: cdk/stepper G P3
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

#### Bug, feature request, or proposal:
The stepper has weird styles when going back and leaving invalid steps, and it's inconsistent with the styles than when going back and leaving valid steps. It's also possible to have a combination of both where some labels will look disabled and some labels will look enabled when in fact they are all disabled.

#### What is the expected behavior?
On a stepper with 3 steps: A, B, C. If A, B and C are filled, valid and we are at C. When going back to B and making it invalid, it should mark C as disabled.
Then when going back to A and making it invalid too it should make B and C look disabled

#### What is the current behavior?
If B is made invalid, then A is made invalid too, B looks disabled but we can;t navigate there (because A is invalid), and C looks enabled even though we can't actually navigate there.

#### What are the steps to reproduce?
https://angular-qwtmdt.stackblitz.io

1. Fill requirements on Step 1.
2. Fill requirements on Step 2.
3. Fill requirements on Step 3.
4. Go back to Step 2 and erase a required field.
5. Go back to Step 1 and erase a required field.

![image](https://user-images.githubusercontent.com/2022649/33862933-1da747aa-de9a-11e7-8b4c-c81fa7e345d2.png)

#### What is the use-case or motivation for changing an existing behavior?
Behavior is inconsistent between steps 2 and 3. And Step 3 seems to promise that it's enabled when it's not, making the UI confusing.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la reproduction StackBlitz liée et suivez les étapes indiquées afin de comparer les libellés des étapes avec la disponibilité réelle de la navigation. Le travail est terminé lorsque l’invalidation de Step 2, puis de Step 1, fait que chaque étape ultérieure inaccessible affiche systématiquement le style désactivé.

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é
Clairement spécifiée
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

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