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

[React] Uncontrolled Listbox do not reset after running reset on the form #1950

Closed
tobeycodes opened this issue Oct 23, 2022 · 2 comments · Fixed by #2004
Closed

[React] Uncontrolled Listbox do not reset after running reset on the form #1950

tobeycodes opened this issue Oct 23, 2022 · 2 comments · Fixed by #2004
Assignees

Comments

@tobeycodes
Copy link

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v1.7.3

What browser are you using?

Chrome

Reproduction URL

https://codesandbox.io/s/optimistic-hawking-cuzwnk?file=/src/App.js

Describe your issue

I would expect that when a form is reset the hidden input values would be reset to the default value which would be reflected in the Listbox.

@tobeycodes
Copy link
Author

@adamwathan Is this something you will accept a pull request for? I am happy to do it for React but might need some assistance for Vue if it is also an issue there. Thanks.

@RobinMalfait
Copy link
Member

Hey! Thank you for your bug report!
Much appreciated! 🙏

There was quite a bit of refactoring that required to get the components in a similar state so that we could apply the change relatively easily. I appreciate the bug report and I also do appreciate the offer for creating a PR yourself!

This should be fixed by #2004, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders.
  • npm install @headlessui/vue@insiders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants