0

I'm trying to use DropdownMenu from http://www.material-ui.com/#/components/dropdown-menu with this starter kit https://github.com/kriasoft/react-starter-kit. The dropdown menu appears but when I click it, it doesn't show its list.

Here are my steps:

  1. npm install --save material-ui
  2. Add the following lines to render() in ContactPage.js:

    render() {
      const title = 'Contact Us';
      this.context.onSetTitle(title);
    
      let menuItems = [
        { payload: '1', text: 'Never' },
        { payload: '2', text: 'Every Night' },
        { payload: '3', text: 'Weeknights' },
        { payload: '4', text: 'Weekends' },
        { payload: '5', text: 'Weekly' },
      ];
      const DropDownMenu = require('material-ui/lib/drop-down-menu');
    
      return (
        <div className="ContactPage">
          <div className="ContactPage-container">
            <h1>{title}</h1>
            <p>...</p>
            <DropDownMenu menuItems={menuItems}/>
            <AceEditor />
          </div>
        </div>
      );
    }
    
  3. npm start

2

1 Answer 1

2

Did you have a look at http://www.material-ui.com/#/get-started/installation?

You need to call injectTapEventPlugin();

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.