Jayprecode / country-state-dropdown

This Component is built with Nextjs, Tailwindcss, Shadcn-ui & Zustand for state management
https://country-state-dropdown.vercel.app
151 stars 12 forks source link

I am unable to view states for the United States (tried in demo) #1

Open jurgen-siegel opened 5 months ago

jurgen-siegel commented 5 months ago

When i click united states the states field is blocked

archodev commented 3 months ago

same

ncmbch commented 3 months ago

same for UAE

ayushchauhan840 commented 3 weeks ago

@jurgen-siegel @archodev @ncmbch This is a issue with country name not matching with the country in the provided data. {countries.find((country) => lowerCase(country.name) === countryValue)?.emoji}

modify above line to this { countries.find( (country) => lowerCase(country.name) === form.getValues("country").toLowerCase() )?.emoji } You've to use toLowerCase() and this will work as expected.