feat(select): add ability to customize the select trigger#3341
Conversation
|
Any progress on this? I think it could be useful for #2722 (comment) |
|
How's this feature coming? ;) |
|
Is this the equivalent of what |
|
Pretty much, It was quite a while ago since I opened this PR. |
|
mm? |
|
Hmm looking through it again, this won't be the same as the |
Adds the `md-select-trigger` directive which allows users to customize the selected value. E.g. it is now possible to do something like this, if the user wanted to reverse the selected label for some reason:
```ts
<md-select placeholder="Food" [formControl]="control" #select="mdSelect">
<md-select-trigger>
{{ select.selected?.viewValue.split('').reverse().join('') }}
</md-select-trigger>
<md-option *ngFor="let food of foods" [value]="food.value">
{{ food.viewValue }}
</md-option>
</md-select>
```
Fixes angular#2275.
4be049b to
e3cdb21
Compare
|
@jelbourn does this new name sound good to you? |
|
We agreed on it in Slack @mmalerba. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds the
md-select-triggerdirective which allows users to customize the selected value. E.g. it is now possible to do something like this, if the user wanted to reverse the selected label for some reason:Fixes #2275.