Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md-option viewValue #4192

Closed
Eldinnie opened this issue Apr 21, 2017 · 4 comments
Closed

md-option viewValue #4192

Eldinnie opened this issue Apr 21, 2017 · 4 comments
Assignees

Comments

@Eldinnie
Copy link

Eldinnie commented Apr 21, 2017

proposal:

I would like to set the viewValue for an option in and md-slect manually. I have the following setup:

<md-select>
  <md-option *ngFor="let data of datas" [value]="data.selector">
    {{data.val}} <md-icon>filter_{{data.num}}</md-icon> 
  </md-option>
</md-select>

What is the expected behavior?

When I select an option the text in the select should only read the text of data.val and not display the icon name aswell.

What is the current behavior?

After I selected the option the select shows the data.val and filter_3 (if the value is 3) as text.

What are the steps to reproduce?

See above

Providing a Plunker (or similar) is the best way to get the team to see your issue.
I would love to, but the plunker mentioned in this template doesn't support md-icon for some reason, wich makes it a bit difficult

What is the use-case or motivation for changing an existing behavior?

It's pretty ugly to see an icon's name in text.

Which versions of Angular, Material, OS, browsers are affected?

"@angular/material": "^2.0.0-beta.3",
"@angular/core": "^4.0.0"

Is there anything else we should know?

@fxck
Copy link
Contributor

fxck commented Apr 21, 2017

#3341

@Eldinnie
Copy link
Author

That would be good aswell, thanks

@crisbeto
Copy link
Member

Closing as something that should be possible in master.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants