JedWatson / JedWatson/react-select

Unable to style input element with the new classNames API in 5.7

Open
#5,538 5 comments 9 reactions 2 assignees View on GitHub

@nderkim is already working on this.

Since Jan 16, 2023.

issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

In PR https://github.com/JedWatson/react-select/pull/5457 the classNames API was added - but I think the input one is not correct?

Previously, the below styling for an "input" would target the <input /> element:

.re-select__input {
  /* whatever */
}
<Select classNamePrefix="re-select" />

However the below code instead targets the input-container div around it:

<Select classNames={{ input: () => 'whatever' }} />

I think its a mistake in here? https://github.com/JedWatson/react-select/pull/5457/files#diff-07753302222b58b652fb23698902955708f7f700fdeecf15980423588766fef4R107-R112

Possible you need to expose input and inputContainer separately, not sure how to style the input as before with classNames

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.