This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(select): BREAKING: allow md-input-container label and remove
md-select-label closes #2684, closes #1586, closes #3307 BREAKING: `md-select-label` is no longer uses. The select will now always display the selected value as the text in the `md-option`. This makes for a better UX for users, as otherwise it was possible to confuse them. `md-select` still supports using the `placeholder` attribute outside of an `md-input-container` but the preferred way of using `md-select` is now as follows: ```html <md-input-container> <label>State</label> <md-select ng-model="selectedState"> <md-option value="{{state}}" ng-repeat="state in states"> </md-select> </md-input-container> ```
- Loading branch information
1 parent
7fe482c
commit 5d9874f
Showing
10 changed files
with
270 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
5d9874f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
if md-select is not in the md-input-container and it has no placeholder property the mdSelectCtrl.setLabelText method fails.
https://github.com/angular/material/blob/master/src/components/select/select.js#L187
Regards,
Andrey
5d9874f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work for objects anymore, only for strings? Like in the example, if I wanted to set the value to
state.name
I can do that, but the reverse binding doesn't work.5d9874f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuhnroyal can you open an issue with a big more detail on the problem you're experiencing?