-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Bug? LeftNav route not working. #583
Comments
Hi mewben, I found this confusing too. The route attribute isn't actually a property, you could call it anything you want. You need to handle this in the onChange callback: (see https://github.com/callemall/material-ui/blob/2eb14e69c411e9165d696df1a88d4ac8036591bf/docs/src/app/components/app-left-nav.jsx#L56) Alternatively you can use the LINK menu item type and pass in the url like shown in the doc you linked. |
Ahh.. I see.. Thanks @afhammad |
I'm having a problem with this... the callback onChange never fires.... why? I followed the docs aswell having: Component <LeftNav
ref="leftNav"
docked={true}
isInitiallyOpen={false}
header={header}
menuItems={menuItems}
selectedIndex={this._getSelectedIndex()}
onChange={this._onLeftNavChange} /> _onLeftNavChange function _onLeftNavChange(e, key, payload) {
this.context.router.transitionTo(payload.route);
} but the _onLeftNavChange never fires.. what's my mistake? thanks |
Nevermind. I forgot the |
http://material-ui.com/#/components/left-nav
The routes
get-started
,css-framework
andcomponents
didn't do anything.The text was updated successfully, but these errors were encountered: