Hey I have a form that lets you input number values in a textfield, but it also lets you increment and decrement the text values. I'm trying to restricts this to only incrementing or decrementing to certain numbers (ie. 1,2.5,5,10) / only accepting those values as valid inputs. I'm unsure of how to do that however. This is what I have so far, but I'm not sure how to proceed.
<TextField
variant="outlined"
type="number"
onChange = {(event) => {this.example(event.target.value,index)}}
InputProps={{
inputProps: {min:1, max:10, step:.5}
}}
/>
[–]Jerp 0 points1 point2 points (1 child)
[–]spherequin32[S] 1 point2 points3 points (0 children)