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

onToggle callback function doesn't fire in LeftNav #1955

Closed
fortunebubble opened this issue Oct 21, 2015 · 1 comment
Closed

onToggle callback function doesn't fire in LeftNav #1955

fortunebubble opened this issue Oct 21, 2015 · 1 comment
Labels
component: menu This is the name of the generic UI component, not the React module!

Comments

@fortunebubble
Copy link

I was using Material-UI LeftNav and implemented it as follow

<LeftNav ref="leftNav"menuItems={MenuItems} / >

MenuItems = [
  { text: 'A', iconClassName: 'fa fa-search' },
  { text: 'B', iconClassName: 'fa fa-pencil-square-o' },
  { text: 'C', iconClassName: 'fa fa-star' },
  { text: 'D', onToggle: function(){console.log('toggled')} }
];

the strange thing is the icon for each item got loaded correctly, but the onToggle function never get fireback, anyone have any idea why? Thanks

@alitaheri
Copy link
Member

Imperative functions on LeftNav have been deprecated. please control the state and events with value and onRequestChange

mnajdova pushed a commit to mnajdova/material-ui that referenced this issue Nov 10, 2020
@zannager zannager added the component: menu This is the name of the generic UI component, not the React module! label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: menu This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants