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

Dropdown does not work with react 17 #20

Closed
windgaucho opened this issue Nov 27, 2020 · 3 comments
Closed

Dropdown does not work with react 17 #20

windgaucho opened this issue Nov 27, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@windgaucho
Copy link

  • windmill-react-ui version: 0.4.1

I am trying to use this library with react 17.0.1 and Dropdown does not work. On click on the dropdown menu it close automatically.

I must to downgrade to react 16.14.0 and it work ok.

@andregamma
Copy link

Same here, the onClose function is called on click for some reason, and then it closes.

@estevanmaito
Copy link
Owner

Thanks for reporting it!

It has something to do with the new way React 17 handles events.

As we are using document event listeners to catch clicks outside the dropdown and close it, things are broken now. I hope I can release a new version with this and other changes by the end of the week.

You can read more about the new behavior in React and why things are broken here: https://reactjs.org/blog/2020/08/10/react-v17-rc.html#fixing-potential-issues

@estevanmaito estevanmaito self-assigned this Dec 1, 2020
@estevanmaito estevanmaito added the bug Something isn't working label Dec 1, 2020
@estevanmaito
Copy link
Owner

Solved and available in 0.5.0. Please, let me know if it doesn't solve your problem.

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

No branches or pull requests

3 participants