Input's FormControl setValue does not work when mat-form-field has chip-list and input is linked to autocomplete
- 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:
Bug
#### What is the expected behavior?
Input's FormControl's setValue should work for an input that is inside a mat-form-field that has both autocomplete and chip-list.
#### What is the current behavior?
FormControl setValue does not work when the following iff a mat-form-field has an input that has matAutocomplete AND the mat-form-field has a mat-chip-list.
SetValue works if one removes the matAutocomplete directive from the input or removes the mat-chip-list element.
#### What are the steps to reproduce?
Demo should have the input incrementing a number every second, which doesn't work:
https://stackblitz.com/edit/angular-ay3yts?file=app%2Fautocomplete-simple-example.html
Deleting mat-chip-list or removing the matAutocomplete directive fixes the issue.
#### What is the use-case or motivation for changing an existing behavior?
I want to be able to programmatically add a chip then clear the input when an option in the autocomplete has been selected.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 5.2.4
Material: 5.2.4
#### Is there anything else we should know?
Nope :)
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée, en particulier app/autocomplete-simple-example.html, et exécutez l’exemple avec matAutocomplete et mat-chip-list présents. Suivez pourquoi setValue du FormControl d’entrée ne se met pas à jour dans cette combinaison. Le travail est terminé lorsque les mises à jour programmatiques fonctionnent, tout en conservant le comportement d’autocomplete et de chip-list.
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é
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100