-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(material/menu): allow updating menu position a la autocomplete #22046
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
feat(material/menu): allow updating menu position a la autocomplete #22046
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.
The changes look good, but the CI is failing because:
- The API golden needs to be updated by running
yarn approve-api menu
. - The MDC test lint check is failing, because you have to add the same test to
src/material-experimental/menu/menu.spec.ts
.
src/material/menu/menu-trigger.ts
Outdated
*/ | ||
updatePosition(): void { | ||
if (this._overlayRef) { | ||
this._overlayRef.updatePosition(); |
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: can be reduce to this._overlayRef?.updatePosition()
.
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.
👍 wasn't sure which was preferred here.
336e038
to
a03b5c5
Compare
Thanks, I was expecting I'd have time to update the PR earlier, but I'll probably tied up for a bit if that doesn't handle everything. |
a03b5c5
to
4dff505
Compare
4dff505
to
e95cac6
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
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. |
On document changes the menu may not be located in the correct location anymore. This exposes the
OverlayRef
'supdatePosition
on the trigger so a user can call it without relying on the private variable_overlayRef
.