Skip to content

[BUG] classNames prop from react-select doesn't work, using in react-select directly works #330

@yashcr07

Description

@yashcr07

Description

When passing the classNames prop from react-select in chakra-react-select it doesn't apply the class to the respective component.
Eg.

classNames={{
  control: (state) => cx("select-control", state.menuIsOpen ? "menu-open" : null),
}}

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?

  • Yes I use 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 not chakra-react-select

Operating System

  • macOS
  • Windows
  • Linux
  • iOS/iPadOS
  • Android

Additional Information

Screenshot 2024-08-27 at 1 10 29 AM

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions