I have almost given-up using Menu
class of both react component and the react-wrapper.
<Menu onSelect={this.onSelect}>
<MenuItem text="First item">
<MenuItem text="Child item"/>
</MenuItem>
<MenuItem text="Second item"/>
</Menu>
- I am rendering simple
Menu
with 2 nestedmenuItems
using@kendo-react-layout
and getting following error.
Uncaught Error: MenuItemInternal.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object. at invariant (invariant.js?4599:42) at ReactCompositeComponentWrapper._renderValidatedComponent (ReactCompositeComponent.js?d2b3:828) at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js?d2b3:359) at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js?d2b3:255) at Object.mountComponent (ReactReconciler.js?399b:43) at ReactDOMComponent.mountChildren (ReactMultiChild.js?9682:234) at ReactDOMComponent._createInitialChildren (ReactDOMComponent.js?ab8a:701) at ReactDOMComponent.mountComponent (ReactDOMComponent.js?ab8a:520) at Object.mountComponent (ReactReconciler.js?399b:43) at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js?d2b3:368)
- Before that, I have been trying to use menu of jQuery wrapper i.e.
@kendo-layout-react-wrapper
. It was rendering fine, however, not passing the actual selected item in the select event object and it has to fetched thru jQuery. Sometimesli
items add no styles/css classes and due to it, difficult to get the selected menuItem using jQuery.
Any suggestions?