angular / angular/components

mat-select - Allow mat-option selected property to be settable

Ouverte
#7,246 23 commentaires 22 réactions 0 personnes assignées Voir sur GitHub
area: material/select feature needs: discussion 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:
Feature request

#### What is the expected behavior?
To be able to set the mat-option selected property

#### What is the current behavior?
Currently the mat-option selected property is readonly and you have to programatically select options.

#### What is the use-case or motivation for changing an existing behavior?
Being able to bind to the selected property would be a cleaner implementation for a user versus having to do it manually, especially in cases where using cascading mat-select with multiple=true (harder to manage)

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.4.3
Material 2.0.0-beta.11
Windows 10
TypeScript - 2.5.2
All browsers

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par lire l’implémentation de mat-select et mat-option afin de comprendre comment la propriété readonly selected est actuellement gérée. Confirmez le comportement de binding attendu pour mat-option, y compris les cas de mat-select en cascade avec multiple=true. C’est terminé lorsque selected peut être défini ou lié comme demandé sans modifier le comportement de sélection existant.

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é
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.