[BUG] React warning in Next.JS: React does not recognize the `getClassNames` prop on a DOM element
pianomansam opened this issue · comments
Description
This is reproducible with either Next.js CodeSandbox:
- Next.js Vanilla JS: https://codesandbox.io/s/chakra-react-select-next-js-dtnsm?file=/pages/index.js
- Next.js TypeScript: https://codesandbox.io/s/chakra-react-select-next-js-typescript-kscuf?file=/pages/index.tsx
But it doesn't seem to occur in the CodeSandboxes that don't have Next.js.
This appears to be related to functionality introduced in react-select@5.7.0.
This can be mitigated by pinning react-select to version 5.6.1 or earlier. However, because of the loose requirement versioning, this needs to be done with resolutions
:
"resolutions": {
"react-select": "5.6.1"
}
chakra-react-select Version
4.4.1
Link to Reproduction
- Next.js Vanilla JS: https://codesandbox.io/s/chakra-react-select-next-js-dtnsm?file=/pages/index.js
- Next.js TypeScript: https://codesandbox.io/s/chakra-react-select-next-js-typescript-kscuf?file=/pages/index.tsx
TypeScript?
- Yes I use TypeScript
Steps to reproduce
- Go to '...'
- Click on '...'
- Scroll down to '...'
- See error
Operating System
- macOS
- Windows
- Linux
- iOS/iPadOS
- Android
Additional Information
No response
Ok, I fixed this by updating to the newest version of react-select
and resolving the issue that arose due to the extra prop they added. I also pinned the dependency version of react-select
to prevent changes there from causing issues with this package in the future.
For full details, see v4.2.2
If this problem is still coming up, feel free to re-open this issue.
i think this bug also exists in v3. is there any workaround?
I can push a fix for v3 tomorrow!