Material UI / material-ui appbar leftnav 切换不工作

Material UI / material-ui appbar leftnav toggle not working

我正在使用 meteor react-packages,我的应用栏显示正确,但我无法让导航切换工作。我直接使用示例中的代码,我什至阅读了 material-ui 存储库中的代码,它似乎应该可以工作。我做错了什么?

let {AppBar, LeftNav} = mui

AppLayout = React.createClass({
  menuItems: [
    {route: '/profile/bio', text: 'bio'},
    {route: '/profile/photos', text: 'photos'},
    {route: '/profile/videos', text: 'videos'},
    {route: '/profile/filmography', text: 'filmography'},
    {route: '/profile/settings', text: 'settings'},
    {route: '/profile/accounts', text: 'accounts'}
  ],

  _toggle(e){
    e.preventDefault()
    this.refs.leftNav.toggle()
  },

  render(){
    return (
      <div>
        <AppBar onLeftIconButtonTouchTap={this._toggle} title='react+meteor'  />
        <LeftNav ref="leftNav" docked={false} menuItems={this.menuItems} />
        <AppView />
      </div>
   )
  }
})

所以请按照此处的指南操作:http://react-in-meteor.readthedocs.org/en/latest/client-npm/

我在这里错过了 mui 指南的一部分:http://material-ui.com/#/get-started

这是我的 lib/app.browserify.js 文件:

// material ui
mui = require('material-ui')
injectTapEventPlugin = require("react-tap-event-plugin")
// Needed for onTouchTap
// Can go away when react 1.0 release
// Check this repo:
// https://github.com/zilverline/react-tap-event-plugin
injectTapEventPlugin()

// this is needed for material-ui styling to work properly
ThemeManager = new mui.Styles.ThemeManager()
React.initializeTouchEvents(true)

我错过了这行 injectTapEventPlugin(),它实际上是在进行注射!在我添加并刷新浏览器后,菜单完美运行。