-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Added ability for anchor menu items to have sub menus. #4198
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
Added ability for anchor menu items to have sub menus. #4198
Conversation
| */ | ||
| private _updateFocusOnMouseEvent(item: any, ev: React.MouseEvent<HTMLElement>) { | ||
| const targetElement = ev.currentTarget as HTMLElement; | ||
| const timeoutDuration = this.props.subMenuHoverDelay !== undefined ? this.props.subMenuHoverDelay : this._navigationIdleDelay; |
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.
const { subMenuHoverDelay: timeoutDuration = this._navigationIdleDelay } = this.props;?
| * menu item | ||
| */ | ||
| onItemClick?: (ev?: React.MouseEvent<HTMLElement>, item?: IContextualMenuItem) => void; | ||
| onItemClick?: (ev?: React.MouseEvent<HTMLElement>, item?: IContextualMenuItem) => boolean | void; |
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.
add comment explaining the return type?
|
@dmarcey Let's move this logic into split button. Really only split buttons should have submenu and a button. |
| const { contextualMenuItemAs: ChildrenRenderer = ContextualMenuItem } = this.props; | ||
|
|
||
| let { subMenuId } = this.state; | ||
| if (item.subMenuProps && item.subMenuProps.id) { |
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.
Maybe put this in a method since this logic is used elsewhere.
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.
Fixed. Thanks.
Added prop for subMenuHoverDelay.
5b1c2cb to
d0a7578
Compare
Added prop for subMenuHoverDelay.
Pull request checklist
$ npm run changeDescription of changes