I want to use material-UI TextInput to enter only integer values (not decimal values). I used the TextInput as follows, but it still allows the decimal number.
How can I do that?
<TextField id="outlined-value"
type="number"
label="Value"
className={classes.standartInputMargin}
value={this.state.allowedValue}
margin="normal"
variant="outlined"
onChange={(event) => Number.isInteger(event.target.value)
? this.setState({ allowedValue: event.target.value })
: null} />
setState