admin管理员组

文章数量:1287866

I am using from react-select but I am not able to remove spinners/arrows from the dropdown.

I am able to remove the default separator | and Dropdown Indicator using

<Select
  ponents={{
    IndicatorSeparator: () => null, DropdownIndicator: () => null
  }}
  {...}
/>

But how can I get rid of these arrows?

I am using from react-select but I am not able to remove spinners/arrows from the dropdown.

I am able to remove the default separator | and Dropdown Indicator using

<Select
  ponents={{
    IndicatorSeparator: () => null, DropdownIndicator: () => null
  }}
  {...}
/>

But how can I get rid of these arrows?

Share Improve this question edited Oct 14, 2020 at 6:58 Aniruddha Shevle 4,9194 gold badges27 silver badges40 bronze badges asked Oct 13, 2020 at 18:59 Rohit SharmaRohit Sharma 431 gold badge1 silver badge5 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

I believe you're setting the type=number for the input element somewhere. In order to remove the up/down arrow. you can use the css code from this tutorial.

You can also see all of the input types and how it's rendered out-of-the-box here.

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

Live Demo

本文标签: javascriptHow to get rid of or remove spinnersarrows in reactselectStack Overflow