-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
onClick is not triggered correctly in MenuItem #387
Labels
component: menu
This is the name of the generic UI component, not the React module!
Comments
Alright, figured this out. I have to add an onChange(e, index, menuItem) callback on the LeftNav instead of the MenuItem. I should read the documentation a bit better. |
oliviertassinari
added
the
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
label
Dec 25, 2022
zannager
added
component: menu
This is the name of the generic UI component, not the React module!
and removed
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
labels
Jan 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I Haven't been able to add a workable onClick callback for a menu item in the LeftNav component.
when I do some debugging in menu-item.js, like this:
_handleOnClick: function(e) {
console.log(this.props.onClick); <----- debug
if (this.props.onClick) this.props.onClick(e, this.props.index);
}
I get the following in the console:
function () { [native code] }
But for some reason the function does nothing when called, not even alert() or console.log()
I have tested it like this:
The text was updated successfully, but these errors were encountered: