csandman / chakra-react-select

A Chakra UI themed wrapper for the popular library React Select

Home Page:https://www.npmjs.com/package/chakra-react-select

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[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:

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

TypeScript?

  • Yes I use TypeScript

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. 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.

commented

i think this bug also exists in v3. is there any workaround?

I can push a fix for v3 tomorrow!

@hfz-r Ok the fix is pushed in v3.3.9, let me know if it doesn't work for you because I didn't really test it

commented

@csandman yes after update its work! thanks man.. you`re the best