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

Empty string returned when selecting a country without states #28

Open
KochiDev786 opened this issue Nov 14, 2024 · 4 comments
Open

Empty string returned when selecting a country without states #28

KochiDev786 opened this issue Nov 14, 2024 · 4 comments

Comments

@KochiDev786
Copy link

I'm experiencing an issue with the dropdown component when selecting a country that doesn't have states (e.g., "Anguilla" or "Vatican City"). When I select such a country, the component is returning an empty string for both the country and state instead of the expected country name.

@mitrank
Copy link

mitrank commented Nov 17, 2024

Hi @KochiDev786 can you help me recreate this issue as I can't see the dropdown component while running it locally?

@KochiDev786
Copy link
Author

KochiDev786 commented Nov 17, 2024

Sure. I experienced it in my own application but it can also be seen in the Shadcn Form Builder playground.
Insert a Location Input component and select a country without states (ex: Antartica, Anguilla, Vatican City, etc.) If you press the submit button, you can see the JSON output as having empty strings.

Screenshot 2024-11-17 at 4 05 21 PM

@hasanharman
Copy link
Owner

Thank you for noticing the issue, will be fixed this week

@mitrank
Copy link

mitrank commented Nov 17, 2024

hi @hasanharman I'm trying to solve this but when the changes are made locally, I can't see the updates I've made in the code, can you help me out here please?
I have made my changes in the components/components/location-form.tsx file

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

No branches or pull requests

3 participants