Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material UI: Remove up/down arrow dials from TextView

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: enter image description here

How would I remove the up and down arrow dials from the TextView?

like image 206
etayluz Avatar asked Jun 12 '18 18:06

etayluz


People also ask

How do I remove the bottom line from a TextField material UI?

You can also use the InputProps prop on the TextField component to achieve this by setting the disableUnderline property to true .

How do you clear the TextField in material UI?

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 .


1 Answers

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; 
}
like image 68
Shubhanu Sharma Avatar answered Oct 17 '22 07:10

Shubhanu Sharma