import * as React from 'react'; import JqxCheckBox from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxcheckbox'; import JqxMenu from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxmenu'; class App extends React.PureComponent<{}> { private myMenu = React.createRef(); constructor(props: {}) { super(props); this.animationOnChange = this.animationOnChange.bind(this); this.disabledOnChange = this.disabledOnChange.bind(this); this.hoverOnChange = this.hoverOnChange.bind(this); this.openOnChange = this.openOnChange.bind(this); this.topLevelArrowsOnChange = this.topLevelArrowsOnChange.bind(this); } public render() { return (

Settings
Enable Animation
Disabled
Enable Hover
Auto Open
Show Top-Level Arrows
); } private animationOnChange(event: any): void { const value = event.args.checked; // enable or disable the menu's animation. if (!value) { this.myMenu.current!.setOptions ({ animationHideDuration: 0, animationShowDelay: 0, animationShowDuration: 0 }); } else { this.myMenu.current!.setOptions ({ animationHideDuration: 200, animationShowDelay: 200, animationShowDuration: 300 }); } } private disabledOnChange(event: any): void { const value = event.args.checked; // enable or disable the menu if (!value) { this.myMenu.current!.setOptions({ disabled: false }); } else { this.myMenu.current!.setOptions({ disabled: true }); } } private hoverOnChange(event: any): void { const value = event.args.checked; // enable or disable the menu's hover effect. if (!value) { this.myMenu.current!.setOptions({ enableHover: false }); } else { this.myMenu.current!.setOptions({ enableHover: true }); } } private openOnChange(event: any): void { const value = event.args.checked; // enable or disable the opening of the top level menu items when the user hovers them. if (!value) { this.myMenu.current!.setOptions({ autoOpen: false }); } else { this.myMenu.current!.setOptions({ autoOpen: true }); } } private topLevelArrowsOnChange(event: any): void { const value = event.args.checked; // enable or disable the top level arrows. if (!value) { this.myMenu.current!.setOptions({ showTopLevelArrows: false }); } else { this.myMenu.current!.setOptions({ showTopLevelArrows: true }); } } } export default App;