import * as React from 'react'; import JqxButton from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttons'; import JqxFormattedInput from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxformattedinput'; class App extends React.PureComponent<{}> { private myFormattedInput = React.createRef(); constructor(props: {}) { super(props); this.getOctal = this.getOctal.bind(this); this.getDecimal = this.getDecimal.bind(this); this.getHexadecimal = this.getHexadecimal.bind(this); } public render() { return (
Get Octal Value Get Decimal Value Get Hexadecimal Value
); } private getOctal(): void { const octalValue = this.myFormattedInput.current!.val('octal'); alert('Octal value: ' + octalValue); } private getDecimal(): void { const decimalValue = this.myFormattedInput.current!.val('decimal'); alert('Decimal value: ' + decimalValue); } private getHexadecimal(): void { const hexadecimalValue = this.myFormattedInput.current!.val('hexadecimal'); alert('Hexadecimal value: ' + hexadecimalValue); } } export default App;