-
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
feat(menu): add menu trigger support #867
Conversation
1aa8e78
to
375a7ae
Compare
|
||
@HostBinding('attr.aria-disabled') | ||
get isAriaDisabled(): string { | ||
return this.disabled ? 'true' : 'false'; |
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.
Just realized we could do this as String(this.disabled)
, which is slightly shorter.
Menu shoould be closed when clicking outside or resizing the window (body:click & window:resize) |
|
||
ngAfterViewInit() { | ||
this._checkMenu(); | ||
this._createOverlay(); |
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.
I just realized that it might be a problem in Angular Universal if we try to create the overlay on init rather than once a user interaction occurs, since under the hood the overlay creates an element with browser APIs.
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.
Hmm, good point. I'll check it out.
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. |
This PR adds basic menu toggling functionality (see design doc here).
For the below, clicking the button will automatically toggle the menu.
Still TODO (in future PRs):