-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
fix(select): fix initial values with reactive forms #2038
Conversation
@@ -175,7 +177,10 @@ export class MdSelect implements AfterContentInit, ControlValueAccessor, OnDestr | |||
* required to integrate with Angular's core forms API. | |||
*/ | |||
writeValue(value: any): void { | |||
if (!this.options) { return; } | |||
if (!this.options) { |
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.
Add comment explaining why this is necessary
@@ -244,8 +244,28 @@ describe('MdSelect', () => { | |||
|
|||
beforeEach(() => { | |||
fixture = TestBed.createComponent(BasicSelect); | |||
}); | |||
|
|||
it('should take an initial view value', () => { |
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.
"...with reactive forms" ?
@kara I'm building from master, although setting the initial value works, there seems to be a bug with the page scrolling down to the md-select when the value is set. |
@kara okay great, thanks for the info |
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. |
Closes #1973
r: @jelbourn