angular / angular/components

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

未关闭
#7,246 23 条评论 22 个 reaction 已指派 0 人 在 GitHub 查看
area: material/select feature needs: discussion P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### 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

贡献指南

打开贡献指南

调研方向

首先阅读 mat-select 和 mat-option 的实现,以了解 readonly selected 属性当前是如何管理的。确认 mat-option 预期的绑定行为,包括 multiple=true 的级联 mat-select 情况。完成的标准是:可以按要求设置或绑定 selected,且不会破坏现有的选择行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。