-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(material/autocomplete): add panelClass default option #20429
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
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.
Do the panel classes have to be on the mat-autocomplete-panel
specifically or can they be one level up on the cdk-overlay-pane
? If it's the latter, then this could be simplified by passing the panelClass
value when creating the overlay here: https://github.com/angular/components/blob/master/src/material/autocomplete/autocomplete-trigger.ts#L637
0764e70
to
5730bb2
Compare
Sure - that works too - as long as its a parent class then we're good. I changed it so the options are now injected into the trigger as well and we pass through the panel 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.
One more nit and it's LGTM on my end.
@@ -2119,6 +2119,39 @@ describe('MatAutocomplete', () => { | |||
})); | |||
}); | |||
|
|||
describe('with panel classes in the default 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.
Can you copy these tests into the MDC autocomplete too?
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.
Oh yeah for sure, good call
…0429) * feat(material/autocomplete): add panelClass default option * update goldens * add tests to MDC
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. |
Necessary for implementing the Google Material version internally, which relies on being able to provide options to the autocomplete to automatically apply a Google Material class