Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing classNames to the input element #598

Closed
petetnt opened this issue Nov 16, 2015 · 7 comments
Closed

Allow passing classNames to the input element #598

petetnt opened this issue Nov 16, 2015 · 7 comments
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer

Comments

@petetnt
Copy link
Contributor

petetnt commented Nov 16, 2015

Correct me if I am wrong, but currently you can set the outer element classes via className and use optionRenderer to add whatever classes you want for the options, but there's currently no way to directly pass classes for the input element.

Of course use child selectors and the main <Select> classNames, if you absolutely need to, but passing classNames to the input element itself would be a nice convenience to have for some situations (such as passing validation classes directly et cetera).

@amit1911
Copy link

+1

1 similar comment
@sitch
Copy link

sitch commented Mar 6, 2017

+1

@jjjjeeffff
Copy link

Somewhat related issue, it looks like if you add className to inputProps it gets applied twice, once to the wrapper and once to the input element itself. Not great when using a CSS framework like Bulma.

@teamtechalpha
Copy link

+1

@jossmac jossmac added the issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer label Mar 17, 2020
@bladey
Copy link
Contributor

bladey commented Jun 3, 2020

Hello -

In an effort to sustain the react-select project going forward, we're cleaning up and closing old issues.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version.

If you aren't using the latest version of react-select please consider upgrading to see if it resolves any issues you're having.

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!

@bladey bladey closed this as completed Jun 3, 2020
@POTEAMARDEEP
Copy link

+1

@ebonow
Copy link
Collaborator

ebonow commented Jun 8, 2021

Greetings all and @POTEAMARDEEP ,

PR #4625 includes several changes to the input component including the removal of the extra div as well as introducing a new prop to the input component called inputClassName

It is scheduled as a part of the next major release for 5.0 and we should be deploying the beta this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer
Projects
None yet
Development

No branches or pull requests

9 participants