-
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
md-select: selected option not removed when ngModel updates #2232
Comments
Forgot to save the plunker :) |
@negberts I could reproduce it in your Plunkr, but not by running |
Okay, thank you :) |
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. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
When the options are updated and the selected option is no longer available the selected option should be cleared.
When using enter to open the Md-Select options there should be no error
What is the current behavior?
The selected option is hold on to, although NgModel is null and the options no longer has the selected option available.
After that, when opening the Md-Select options dialog an error occurs: 'unable to get property focus of undefined or null reference'
What are the steps to reproduce?
http://plnkr.co/edit/USEs6VII79YJA7dnh31g?p=preview
Steps:
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, browsers are affected?
Is there anything else we should know?
Callstack:
"TypeError: Unable to get property 'focus' of undefined or null reference
at ListKeyManager.prototype.setFocus (eval code:4573:9)
at MdSelect.prototype._focusCorrectOption (eval code:5106:13)
at MdSelect.prototype._onPanelDone (eval code:5007:13)
at View_MdSelect2.prototype.handleEvent_1 (Function code:459:5)
The text was updated successfully, but these errors were encountered: