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] Can't add custom props for MenuList via innerProps #152

Closed
2 of 6 tasks
JasonasIgn opened this issue Jul 4, 2022 · 3 comments · Fixed by #150
Closed
2 of 6 tasks

[BUG] Can't add custom props for MenuList via innerProps #152

JasonasIgn opened this issue Jul 4, 2022 · 3 comments · Fixed by #150
Assignees
Labels
Bug Something isn't working

Comments

@JasonasIgn
Copy link

Description

When I add custom properties on innerProps for MenuList (like data-testid) they are ignored. It seems they aren't exploded in MenuList component. The original react-select library allows that.

chakra-react-select Version

3.3.7

Link to Reproduction

https://codesandbox.io/s/react-select-playground-forked-nqwxik?file=/src/index.tsx

TypeScript?

  • Yes I use TypeScript

Steps to reproduce

No response

Operating System

  • macOS
  • Windows
  • Linux
  • iOS/iPadOS
  • Android

Additional Information

No response

@JasonasIgn JasonasIgn added the Bug Something isn't working label Jul 4, 2022
@csandman
Copy link
Owner

csandman commented Jul 5, 2022

Thanks for pointing this out, and the reproduction! I'll take a look at why this is happening. Pretty sure I have a good idea though.

@csandman
Copy link
Owner

csandman commented Jul 5, 2022

Ok this should be fixed in the most recent version pushed for v3 and v4.

Here's A working example on v3 which you mentioned using in your issue: https://codesandbox.io/s/chakra-react-select-v3-innerprops-db3dno

And here's a working version of the sandbox you provided which is on v4: https://codesandbox.io/s/chakra-react-select-innerprops-wje4q7?file=/src/index.tsx

@csandman
Copy link
Owner

csandman commented Jul 6, 2022

If you run into any other situations with this problem, let me know! I think I added the innerProps forwarding to all of the components that had it in the original library, but if I missed one please feel free to reach out.

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.

2 participants