Skip to content
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

IconMenu onSelect Not working #1453

Open
jasonvillalon opened this issue May 9, 2017 · 2 comments
Open

IconMenu onSelect Not working #1453

jasonvillalon opened this issue May 9, 2017 · 2 comments

Comments

@jasonvillalon
Copy link

Hi, Looks like condition if (item.type === MenuItem) { condition in Menu.js is always false even then children is MenuItem
my work around for now is always add the event even condition above is false

return _react2.default.cloneElement(item, {
            ripple: item.props.ripple || _this4.props.ripple,
            selected: typeof item.props.value !== 'undefined' && _this4.props.selectable && item.props.value === _this4.props.selected,
            onClick: _this4.handleSelect.bind(_this4, item)
          });
@DavidHenri008
Copy link

DavidHenri008 commented May 25, 2018

@javivelasco & @rubenmoya I am experiencing the same issue. I realized the same bug it when I tried to figure out why the menu was not closing when clicking a MenuItem. The item.type always returns Themed as type so the handleSelect function is not bound to the onClick event.

@jordmantheman
Copy link

jordmantheman commented Aug 20, 2020

I don't see this issue when running on the react-toolbox dev server.
But do when running our App in development mode (read: not production!). I suspect it has to do with this issue w/ react-hot-loader -- gaearon/react-hot-loader#304

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants