Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] React warning in Next.JS: React does not recognize the getClassNames prop on a DOM element #223

Closed
6 tasks
pianomansam opened this issue Dec 1, 2022 · 5 comments · Fixed by #224
Closed
6 tasks
Assignees
Labels
Bug Something isn't working

Comments

@pianomansam
Copy link

pianomansam commented Dec 1, 2022

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

@pianomansam pianomansam added the Bug Something isn't working label Dec 1, 2022
csandman added a commit that referenced this issue Dec 2, 2022
```
React does not recognize the `getClassNames` prop on a DOM element
```
@csandman
Copy link
Owner

csandman commented Dec 2, 2022

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.

@hfz-r
Copy link

hfz-r commented Dec 21, 2022

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

@csandman
Copy link
Owner

I can push a fix for v3 tomorrow!

@csandman
Copy link
Owner

@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

@hfz-r
Copy link

hfz-r commented Dec 23, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants