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
775 stars 33 forks source link

fix: Add ChakraMenu to provide context for MenuIcon dependency #269

Closed malinskibeniamin closed 1 year ago

malinskibeniamin commented 1 year ago

This is required because of the issue in the latest Chakra UI release where useMenuStyles will break the app.

See example from Storybook Screenshot 2023-07-24 at 14 24 37

codesandbox-ci[bot] commented 1 year ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 852b139ff621fec8892cfe6055ad3079658351f2:

Sandbox Source
chakra-react-select demo Configuration
chakra-react-select TS demo Configuration
chakra-react-select + next.js Configuration
chakra-react-select + next.js + typescript Configuration
csandman commented 1 year ago

Thanks for pushing this, and bringing it to my attention! There were a couple issues with your original push though. The comment you included wasn't in a valid spot. Also, you were including a Menu for every option, where as there's no need to include more than one. I ended up moving it to the react-select Menu component to reduce duplication.