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 摘要。