|
Title: MenuButton example issues Post by: chrwei on July 31, 2019, 02:08:10 PM I'm having problems getting onItemClick working. as a test, I've ran create-react-app to make a new project and replaced App.js with the following based on your MenuButton live demo.
Code: import React from 'react'; the button and menu renders fine, but I get no alert and no console log no matter where or what I click. I've tried every permutation of handleClick I can think of and either get understandable errors or no output. what's the right way to handle the item click and get the value? Title: Re: MenuButton example issues Post by: chrwei on August 12, 2019, 12:55:05 PM I worked it out, the onMenuItemClick prop needs to be on MenuButton, not on Menu.
|