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

Region value won't reset if country gets set to Select Country #139

Open
UndercoverNL opened this issue Oct 9, 2022 · 1 comment
Open
Labels
Milestone

Comments

@UndercoverNL
Copy link

UndercoverNL commented Oct 9, 2022

When having a country and region selected, and setting the country back to the Select Country value, it will reset the visual of the regions dropdown but not update the value following the onChange method.

using showDefaultOption={false} will fix this of course, but this stays a bug when not having this option set to false

@benkeen benkeen added the Bug label Aug 13, 2023
@benkeen benkeen added this to the 3.7.0 milestone Aug 13, 2023
@benkeen
Copy link
Member

benkeen commented Dec 9, 2024

Hi @UndercoverNL! Actually state is controlled on your end, not the package itself. So on the onChange handler for the country you should check for a null/empty value and set the region state to blank in that condition too.

But this is a good point. I'll update the docs to make this explicitly shown.

@benkeen benkeen added Docs and removed Bug labels Dec 9, 2024
@benkeen benkeen modified the milestones: 4.0.0, 4.0.1 Dec 9, 2024
@benkeen benkeen modified the milestones: 4.0.1, 4.0.2 Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants