kendo-react-ui : Menu is not passing selected item in Select event and sometimes throwing exception while loading

561 views Asked by At

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>
  1. I am rendering simple Menu with 2 nested menuItems 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)

  1. 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. Sometimes li items add no styles/css classes and due to it, difficult to get the selected menuItem using jQuery.

Any suggestions?

0

There are 0 answers