I have this TextView in Material UI:
<TextField
id="contact phone number"
label="Contact phone number"
type="number"
value={this.state.contactPhoneNumber}
onChange={this.handleChange('contactPhoneNumber')}
placeholder="Contact phone number"
margin="normal"
/>
It looks like this:
How would I remove the up and down arrow dials from the TextView?
You can also use the InputProps prop on the TextField component to achieve this by setting the disableUnderline property to true .
To clear the Material UI text field Value in React, we can set the value property of the input to an empty string. to add a button and a text field. We assigned the textInput ref to the TextField so we can its input value to an empty string when we click on the Button .
You can try css approach for that.
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With