angular / angular/components

bug(MatSelect): When navigating with keyboard, sometimes the first press of the down arrow is "ignored"

Ouverte
#21,677 6 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
area: material/select needs: discussion P4
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

#### Reproduction

The value of the first `MatOption` in a `MatSelect` must be `null`. Example:
```

-- // <------- Here
Dog
Cat

```

- https://stackblitz.com/edit/angular-lyemh3?file=src%2Fapp%2Fselect-hint-error-example.html

Steps to reproduce:
1. Refresh development server
2. Tab to the `MatSelect`
2. Use the down arrow to make a selection
3. Notice that the very first press appears to be ignored

#### Expected Behavior

The first press of the arrow should select `Dog`.

#### Actual Behavior

The first press of the arrow appears to do nothing.

#### Environment

- Angular: 11.0.6
- CDK/Material: 11.0.3
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par reproduire le comportement dans le StackBlitz lié avec un MatSelect dont la première MatOption a une null value, puis suivez le chemin de navigation au clavier de MatSelect. C’est terminé lorsque la première pression sur Down Arrow sélectionne Dog au lieu de sembler ignorée, avec un test de régression couvrant ce cas.

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é
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

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