mat-select in multiple mode is difficult to use with reactive forms
- 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:
feature request
#### What is the expected behavior?
`mat-select` in `multiple` mode lets me put `formControls` on individual options
#### What is the current behavior?
I have a list of boolean options (checkboxes) that a user can set. `formControl` only works on the mat-select, which is populated with an array. If I want to prepopulate those, I need to manually build an array to set on my `mat-select`. I cannot bind to `valueChanges` on individual options.
#### What is the use-case or motivation for changing an existing behavior?
Manually keeping this array updated and in sync with my individual settings is painful. I'd rather create `formControl`s for each option, which I can bind to and set/patch as I need to. Perhaps let me set a `formGroup` on the `mat-select` instead of a `formControl`?
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
"@angular/core": "5.2.9",
"@angular/material": "5.2.4",
"typescript": "2.8.1"
#### Is there anything else we should know?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire la configuration signalée de mat-select en multiple-mode avec Angular reactive forms, en vous concentrant sur le comportement de formControl pour le select par rapport aux options individuelles et à leurs valueChanges. Le travail sera terminé lorsque les utilisateurs pourront lier et préremplir des option controls individuels sans synchroniser manuellement un tableau, et que la form API prise en charge ainsi que le comportement seront documentés par des tests.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100