question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't provide style for `indicatorContainer`

See original GitHub issue

I can’t provide a style for indicatorContainer, (not to be confused with indicatorsContainer)

The element is also not listed under styles as being stylable, but it does contain styles (like padding and color), which I’m now unable to override.

const styles = {
  // this one works
  indicatorsContainer: (provided) => ({
    ...provided,
    color: 'red',
  }),

  // THIS IS THE BUGGING ONE
  indicatorContainer: (provided) => ({
    ...provided,
    color: 'blue',
  }),
};

<Select styles={styles} />

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

7reactions
acdvscommented, Apr 2, 2021

A change needs to be made in the code and docs for this. Everything points to indicatorsContainer being the key to overriding this element right now. There’s a huge inconsistency.

6reactions
smeijercommented, Aug 25, 2020

Thanks, @codeReader52! Looks like you’re right. I guess the change in naming convention threw me off.

This works just fine:

<Select
  styles={{
    dropdownIndicator: (provided) => ({
      ...provided,
      color: 'red',
      ':hover': {
        color: 'yellow',
      },
    }),
  }}
/>
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to style react-select options - css - Stack Overflow
Style individual components with custom css using the styles prop. ... You can provide a custom className prop to the component, ...
Read more >
How can I change arrow? · Issue #685 · JedWatson/react-select
To remove the dropdown indicator in a select add this to your custom styles object. dropdownIndicator: base => ({ ...base, display: 'none' }) ......
Read more >
Solving the React Error: Not Picking Up CSS Style | Pluralsight
In this guide, you will learn about the errors that can occur while importing a CSS file into your React file.
Read more >
Styles - React Select
The recommended way to provide custom styles to react-select is to use the styles prop. styles takes an object with keys to represent...
Read more >
First steps with React Native. Target audience - ITNEXT
Create a titleFinder.js file inside the components folder and add the ... The difference with regular variables is that you can't set the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found