-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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: list options require a parent selection list #9899
fix: list options require a parent selection list #9899
Conversation
* Since the `MatListOption` component requires a parent `MatSelectionList`, the DI of the selection list shouldn't be optional. Otherwise there will be runtime exceptions due to an undefined selection list property.
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
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
@jelbourn I've marked this as a patch now (see PR description). |
Since the `MatListOption` component requires a parent `MatSelectionList`, the DI of the selection list shouldn't be optional. Otherwise there will be runtime exceptions due to an undefined selection list property.
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. |
MatListOption
component requires a parentMatSelectionList
, the DI of the selection list shouldn't be optional. Otherwise there will be runtime exceptions due to an undefined selection list property.@jelbourn @crisbeto Technically this is a breaking change, because before you could theoretically place a
<mat-list-option>
element without a list. This shouldn't be the case though, because there would be too many runtime exceptions. Also instead of Angular's defaultNo provider
message, we could have a custom one, to make it more clear what's going on.