Open yashcr07 opened 2 weeks ago
Interesting, I've never actually used this prop from react-select
, so I'm not sure why those aren't getting forwarded. I'll take a look at what's going on and let you know.
@csandman I found the issue, it will only work out of the box with components which are not part of this lib's chakraComponents
. I've updated the sandbox with a custom Control component and it works, so I'm not sure if this is a bug and how you'd want to handle this, but surely would be helpful to include it in the docs.
I've recently taken a look comparing the custom internal components of react-select
and the ones I made for charka-react-select
, and realized mine are a bit out of date haha. That classNames
prop is actually newer than my components, so none of mine actually have support for it yet. This was the issue/PR where it was originally introduced for reference:
So in order to add support for the classNames
prop, I'm going to have to do a larger scale change across the custom components in this package, which will probably take a bit, so I'll have to find some time I can get to it.
For more info, can you fill me in on the specific use case you have for this? Are you trying to pair this with tailwind or something like the original feature was designed for?
Description
When passing the
classNames
prop fromreact-select
inchakra-react-select
it doesn't apply the class to the respective component. Eg.I see the props are spread here, which should pass it to react-select and this should probably work
chakra-react-select Version
4.9.1
Link to Reproduction
https://codesandbox.io/p/sandbox/chakra-react-select-classnameprefix-demo-forked-cyym58?file=%2Fexample.js%3A15%2C33
TypeScript?
Steps to reproduce
I've used the same configuration for both the dropdowns, you'll see the
react-select
dropdown applies the class but notchakra-react-select
Operating System
Additional Information