csandman / chakra-react-select

A Chakra UI themed wrapper for the popular library React Select
https://www.npmjs.com/package/chakra-react-select
MIT License
761 stars 31 forks source link

[BUG] Incompatible with Chakra UI Pro theme #316

Open chriskuech opened 2 months ago

chriskuech commented 2 months ago

Description

When I installed Chakra UI Pro theme and import chakra-react-select, then the app crashes with the following stack traces:

image

chakra-react-select Version

4.7.6

Link to Reproduction

No response

TypeScript?

Steps to reproduce

  1. Install and configure Chakra UI Pro theme
  2. Instantiate a Select from chakra-react-select

Operating System

Additional Information

No response

csandman commented 2 months ago

Can you give me a code example of how the app is set up? I've never used the Chakra pro theme, so it's hard for me to diagnose this without an example.

chriskuech commented 2 months ago

Ya its just this guide. It's basically just copying in a chakra theme file.

csandman commented 1 month ago

Ok, actually looking at the part of the error Cannot read properties of undefined (reading '500'), this makes me think this package is not able to find one of the basic color palettes for red or blue that the normal theme has. Are the base color scheme colors not available in the pro theme color palette?

If not, you'd have to pass the selectedOptionColorScheme prop with some color palette the theme actually has. I believe this should fix the issue but let me know if not.