8000 Request: Support ngValue on md-option within md-select · Issue #4161 · angular/components · GitHub
[go: up one dir, main page]

Skip to content

Request: Support ngValue on md-option within md-select #4161

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

Closed
ghost opened this issue Apr 19, 2017 · 4 comments
Closed

Request: Support ngValue on md-option within md-select #4161

ghost opened this issue Apr 19, 2017 · 4 comments

Comments

@ghost
Copy link
ghost commented Apr 19, 2017

Bug, feature request, or proposal:

Request

What is the expected behavior?

Support [ngValue] for binding to Objects (not just strings)

What is the current behavior?

[ngValue] is not supported in md-option / md-select as it is on plain items

What are the steps to reproduce?

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

It makes life a loooot easier :), and as it is supported by standard-option items , md-select should support it aswell.

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

Angular 4.0.0 / Mat 2.0.0-beta.3

Is there anything else we should know?

Keep up the good work!

@willshowell
Copy link
Contributor

Could this be a duplicate of #2785?

@kara
Copy link
Contributor
kara commented Apr 20, 2017

@MoxxNull We actually already support objects in options, so there's no need for a second ngValue property (core only has this to avoid breaking people using the native value). See plunker here:

http://plnkr.co/edit/djxiu9qPS0LzkBfcJFpb?p=preview

If you're running into object equality issues, compareWith would be the right way to address. As @willshowell mentioned, this is tracked in #2785.

@kara kara closed this as completed Apr 20, 2017
@ghost
Copy link
Author
ghost commented Apr 21, 2017

Sorry, absolutly correct... I was just trying to use ngValue instead of simply trying value... my bad :(

@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 5, 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

2 participants
0