Open devrudraa opened 7 months ago
I am trying to make an address form where users can select the country and based on the selection they can select the state and city but I didn't find any way to access the state or city of a particular country.
<Select fullWidth value={selectedCountry} onChange={handleCountryChange} label="Country" > {countries.map((country) => { return ( country && ( <MenuItem key={country.flag} value={country.flag}> {country.name.common} </MenuItem> ) ); })} </Select>
I want to get all the states based on the 'selectedCountry' value
Stack:
I didn't find any way to access the state or city of a particular country
What do you mean? The dataset does not contains the cities of a country.
I am trying to make an address form where users can select the country and based on the selection they can select the state and city but I didn't find any way to access the state or city of a particular country.
I want to get all the states based on the 'selectedCountry' value
Stack: