How to hide InputContainer when select isn't focused? #5947
Unanswered
TNSaturday
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm facing the following problem when dealing with react-select multi select:

Basically, it renders an additional
div
inside which an actualinput
element resides. What I want to do is to hide it when select itself is not in the focused state.I tried different things, but none of them worked:
It doesn't work, since it's only hides the blinking cursor and not the actual input-container
div
which is what is needed.InputContainer
, but React Select doesn't expose it as a separate component, thus it's not possible to pass it any styles.It also doesn't work, since it's not a forwardRef component and can't be passed a ref. So, taking into account all the above, how do I hide this input container?
Beta Was this translation helpful? Give feedback.
All reactions