import * as React from 'react'; import JqxRadioButton from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxradiobutton'; class App extends React.PureComponent<{}> { private events = React.createRef(); private count: number = 0; constructor(props: {}) { super(props); this.clearLog = this.clearLog.bind(this); this.firstBtnOnChange = this.firstBtnOnChange.bind(this); this.secondBtnOnChange = this.secondBtnOnChange.bind(this); this.thirdBtnOnChange = this.thirdBtnOnChange.bind(this); } public render() { return (

House Contract

12 Months Contract 6 Months Contract 3 Months Contract 1 Month Contract
Events:
); } private clearLog(): void { this.count++; const log = this.events.current!; if (this.count >= 2) { log.innerHTML = ''; this.count = 0; } } private firstBtnOnChange(event: any): void { this.clearLog(); const log = this.events.current!; const checked = event.args.checked; if (checked) { log.innerHTML += '
Checked: 12 Months Contract
'; } else { log.innerHTML += '
Unchecked: 12 Months Contract
'; } } private secondBtnOnChange(event: any): void { this.clearLog(); const log = this.events.current!; const checked = event.args.checked; if (checked) { log.innerHTML += '
Checked: 6 Months Contract
'; } else { log.innerHTML += '
Unchecked: 6 Months Contract
'; } } private thirdBtnOnChange(event: any): void { this.clearLog(); const log = this.events.current!; const checked = event.args.checked; if (checked) { log.innerHTML += '
Checked: 3 Months Contract
'; } else { log.innerHTML += '
Unchecked: 3 Months Contract
'; } } } export default App;