import * as React from 'react'; import JqxButton from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttons'; import JqxCheckBox from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxcheckbox'; import JqxWindow from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxwindow'; class App extends React.PureComponent<{}, any> { private myWindow = React.createRef(); private findButton = React.createRef(); private searchTextInput = React.createRef(); constructor(props: {}) { super(props); this.onKeyUp = this.onKeyUp.bind(this); this.onKeyDown = this.onKeyDown.bind(this); this.onChange = this.onChange.bind(this); this.showWindowButtonClick = this.showWindowButtonClick.bind(this); this.hideWindowButtonClick = this.hideWindowButtonClick.bind(this); this.pinWindowButtonClick = this.pinWindowButtonClick.bind(this); this.unpinWindowButtonClick = this.unpinWindowButtonClick.bind(this); this.collapseWindowButtonClick = this.collapseWindowButtonClick.bind(this); this.expandWindowButtonClick = this.expandWindowButtonClick.bind(this); this.state = { disabled: true, draggable: true }; } public render() { const buttonsStyle: React.CSSProperties = { float: "left", marginLeft: 5 }; return (
Open Close Pin Unpin Collapse Expand
Find
Find what:
Find Next Cancel


Match case
); } private SearchButtonHandle = () => { if (this.searchTextInput.current!.value !== '') { this.findButton.current!.setOptions({ disabled: false }); } else { this.findButton.current!.setOptions({ disabled: true }); } } // Event handling private onKeyUp(): void { this.SearchButtonHandle(); } private onKeyDown(): void { this.SearchButtonHandle(); } private onChange(): void { this.SearchButtonHandle(); } private showWindowButtonClick(): void { this.myWindow.current!.open(); } private hideWindowButtonClick(): void { this.myWindow.current!.close(); } private pinWindowButtonClick(): void { this.myWindow.current!.setOptions({ draggable: false }); } private unpinWindowButtonClick(): void { this.myWindow.current!.setOptions({ draggable: true }); } private collapseWindowButtonClick(): void { this.myWindow.current!.collapse(); } private expandWindowButtonClick(): void { this.myWindow.current!.expand(); } } export default App;