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.

`classNamePrefix` is not applied to `<input>` wrapper

See original GitHub issue

Our company has custom field appearance, which I want to apply to ReactSelect. Since we are not going to change that (in nearest future), easiest way for us is “Using classNames”.

When I set classNamePrefix prop, it is not applied to all elements.

<div class="my-select__value-container my-select__value-container--has-value css-1hwfws3">
    <div class="my-select__single-value css-1uccc91-singleValue">Value</div>
    <div class="css-w8afj7-Input">
        <div class="my-select__input" style="display: inline-block;">
            <input autocapitalize="none" autocomplete="off" autocorrect="off" id="react-select-4-input" spellcheck="false" tabindex="0" type="text" aria-autocomplete="list" value="" style="box-sizing: content-box; width: 2px; background: 0px center; border: 0px; font-size: inherit; opacity: 1; outline: 0px; padding: 0px; color: inherit;">
            <div style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-size: 12px; font-family: &quot;Helvetica Neue&quot;, &quot;Liberation Sans&quot;, Helvetica, Arial, sans-serif; font-weight: 400; font-style: normal; letter-spacing: normal; text-transform: none;"></div>
        </div>
    </div>
</div>

Problem is in css-w8afj7-Input class/element, which is not customizable. Version tested with is 3.0.4.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
kevinhaascommented, Oct 10, 2020

Why is this closed? It doesn’t make sense that some of the elements (input in this case) don’t receive a class with the prefix. So many issues in this repo are just closed for no reason.

0reactions
bladeycommented, Jun 3, 2020

Hello -

Thanks for your input @ratmirslv.

In an effort to sustain the react-select project going forward, we’re closing issues that appear to have been resolved via community comments or issues that are now redundant based on their age.

However, if you feel this issue is still relevant and you’d like us to review it - please leave a comment and we’ll do our best to get back to you, and we’ll re-open it if necessary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSSProvider not generating class prefix with classNamePrefix
I have tried many solutions from stackoverflow and github issues as well. But none of them are working for me. import React from...
Read more >
Styles - React Select
A flexible and beautiful Select Input control for ReactJS with multiselect, ... The styles prop; The classNames prop; The classNamePrefix prop ...
Read more >
JSSProvider not generating class prefix with classNamePrefix ...
Coding example for the question JSSProvider not generating class prefix with classNamePrefix-Reactjs.
Read more >
JSS integration with React
The idea is that you define a theme, wrap your application with ... You can minify class names by passing id prop, so...
Read more >
react-star-rate - npm
You can also apply custom styles using CSS Stylesheets. The classnames are determined with the classNamePrefix prop (defaults to "react-star- ...
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