question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MenuItem onClick event is not called.

See original GitHub issue

Current behaviour

An onClick event defined for a MenuItem (with sub-menu items) is not called when clicked.

Expected behaviour

Expected defined onClick function to be called.

Reproducible example

https://codesandbox.io/s/falling-surf-y98ho?file=/src/index.js

Your environment

Software Version(s)
carbon-react 66.0.0
carbon-factory
react-scripts
React
Browser
npm
Operating System

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ian-forstercommented, Apr 15, 2021

Outcome of the discussion with @jlongridge and @tempertemper is that the missing onClick event handler should be fixed so let’s go ahead and raise a story for that. How it should be used is a different usability question that will be resolved by UX.

1reaction
ian-forstercommented, Apr 8, 2021

Will discuss privately with @jlongridge & @tempertemper to agree next steps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MenuItem onClick() is not triggered · Issue #161 - GitHub
When clicking on the MenuItem, onClick() should log data. Actual Behavior. onClick() did not get called, it might be influenced by ...
Read more >
Onclick on select's MenuItem not working properly
You have to move the onChange to the Select component like this: <Select style={{ width: "60%" }} value="none" onChange={this.
Read more >
MenuItem.Click Event (System.Windows.Forms)
Occurs when the menu item is clicked or selected using a shortcut key or access key defined for the menu item.
Read more >
How to use the menu with events - Radzen.Blazor Components
Hi @Daniel, UPDATE: Using the click attribute no longer works because the Menu component now has a dedicated Click event. The menu item...
Read more >
how to attach onclick event to menuitem - ZK Forum
So far I'm not having any luck. It appears that the event listeners are being added but my handler method is never getting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found