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] menuIsOpen broken in 4.2.1 #176

Closed
2 of 6 tasks
jezzzm opened this issue Sep 9, 2022 · 3 comments · Fixed by #177
Closed
2 of 6 tasks

[BUG] menuIsOpen broken in 4.2.1 #176

jezzzm opened this issue Sep 9, 2022 · 3 comments · Fixed by #177
Assignees
Labels
Bug Something isn't working

Comments

@jezzzm
Copy link

jezzzm commented Sep 9, 2022

Description

Looks like the changes in 4.2.1 for read-only behaviour broke the controlled functionality of react-select.

minimal repro: https://codesandbox.io/s/chakra-react-select-menuisopen-fjzmyt?file=/src/App.tsx

changing the dep to 4.2.0 in that CSB shows it working as intended

thanks!

chakra-react-select Version

4.2.1

Link to Reproduction

https://codesandbox.io/s/chakra-react-select-menuisopen-fjzmyt?file=/src/App.tsx

TypeScript?

  • Yes I use TypeScript

Steps to reproduce

  1. set menuIsOpen to true
  2. menu is not open

Operating System

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

Additional Information

No response

@jezzzm jezzzm added the Bug Something isn't working label Sep 9, 2022
@csandman
Copy link
Owner

csandman commented Sep 9, 2022

Oops, I know what changed to break this, I'll take a look!

@csandman
Copy link
Owner

csandman commented Sep 9, 2022

Man oh man, turns out it was just caused by a missing parenthesis... Thanks for catching this haha, I pushed a fix in v4.2.2

Here's a working version of your repro: https://codesandbox.io/s/chakra-react-select-menuisopen-fix-21kcu1?file=/src/App.tsx

@jezzzm
Copy link
Author

jezzzm commented Sep 9, 2022

haha the number of times i've missed parens with nullish coalesce... not good!

thanks for the quickest fix ive ever seen, legend!

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