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): remove selection if option is removed #2560
fix(select): remove selection if option is removed #2560
Conversation
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.
firstOption.click(); | ||
fixture.detectChanges(); | ||
|
||
expect(select.selected).toBe(select.options.first); |
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.
Can you add fallback messages for both assertions if the test fails? e.g. Expected first option to be selected.
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.
LGTM
019e2fc
to
3f765ae
Compare
* Currenty when an option is selected and the option is somehow programmatically removed the select updates its options. Right now it does not remove the selection if the selection has been removed from the options. Fixes angular#2524
3f765ae
to
86e7963
Compare
* fix(select): remove selection if option is removed * Currenty when an option is selected and the option is somehow programmatically removed the select updates its options. Right now it does not remove the selection if the selection has been removed from the options. Fixes angular#2524 * Update spec name * Remove check logic and just keep test * Update expectation message * Fix linting * Wait for zone to be stable
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. |
Currenty when an option is selected and the option is somehow programmatically removed the select updates its options.
Right now it does not remove the selection if the selection has been removed from the options.
Fixes #2524