-
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: set selected state for MdListOption
in selectedOptions OnInit
#7189
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.
LGTM. A few minor comments
@@ -132,6 +132,12 @@ export class MdListOption extends _MdListOptionMixinBase | |||
super(); | |||
} | |||
|
|||
ngOnInit() { |
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 the OnInit
interface to the class?
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.
Done
src/lib/list/selection-list.spec.ts
Outdated
@@ -451,6 +481,13 @@ class SelectionListWithDisabledOption { | |||
} | |||
|
|||
@Component({template: ` | |||
<mat-selection-list> | |||
<md-list-option [selected]="true">Item</md-list-option> | |||
</mat-selection-list> |
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.
The template should have a two space indentation here (as in other test components)
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.
Done
src/lib/list/selection-list.spec.ts
Outdated
imports: [MdListModule], | ||
declarations: [ | ||
SelectionListWithSelecedOption | ||
], |
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.
Nit: This can fit into a single line.
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.
Done.
17058cd
to
b93d851
Compare
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
<mat-selection-list> | ||
<md-list-option [selected]="true">Item</md-list-option> | ||
</mat-selection-list>`}) | ||
class SelectionListWithSelecedOption { |
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.
You've got a typo here SelectionListWithSelecTedOption
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
b93d851
to
ce461e8
Compare
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. |
Fixes #7183