playcanvas / pcui

UI component library for web-based tools
http://playcanvas.github.io/pcui
MIT License
669 stars 65 forks source link

Clicking a `MenuItem` throws an exception if `onSelect` is `undefined` #243

Closed willeastcott closed 1 year ago

willeastcott commented 1 year ago

Describe the bug If a menu item is created that has no onSelect function specified, an exception will be thrown when the item is selected.

To Reproduce Steps to reproduce the behavior:

  1. Run the Menu example in the examples folder
  2. Right click to open the context menu
  3. Select any menu item
  4. See error in JS console

Expected behavior Menu dismisses with no error in console.

Screenshots image