react-country-state-city
Advanced tools
Comparing version 1.0.8 to 1.0.9
{ | ||
"name": "react-country-state-city", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "React-country-state-city allows you to create a Select dropdown for countries, states, cities with search options.And also provide the option to create a language select dropdown to list all Languages.", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -122,4 +122,5 @@ # React-country-state-city | ||
onChange={(e) => { | ||
setCountryid(e.id); | ||
GetState(e.id).then((result) => { | ||
const country = stateList[e.target.value]; //here you will get full country object. | ||
setCountryid(country.id); | ||
GetState(country.id).then((result) => { | ||
setStateList(result); | ||
@@ -131,3 +132,3 @@ }); | ||
{countryList.map((item, index) => ( | ||
<option key={index} value={item.id}> | ||
<option key={index} value={index}> | ||
{item.name} | ||
@@ -140,4 +141,5 @@ </option> | ||
onChange={(e) => { | ||
setStateid(e.id); | ||
GetCity(countryid, e.id).then((result) => { | ||
const state = stateList[e.target.value]; //here you will get full state object. | ||
setStateid(state.id); | ||
GetCity(countryid, state.id).then((result) => { | ||
setCityList(result); | ||
@@ -149,3 +151,3 @@ }); | ||
{stateList.map((item, index) => ( | ||
<option key={index} value={item.id}> | ||
<option key={index} value={index}> | ||
{item.name} | ||
@@ -158,3 +160,4 @@ </option> | ||
onChange={(e) => { | ||
setCityid(e.id); | ||
const city = cityList[e.target.value]; //here you will get full city object. | ||
setCityid(city.id); | ||
}} | ||
@@ -164,3 +167,3 @@ value={cityid} | ||
{cityList.map((item, index) => ( | ||
<option key={index} value={item.id}> | ||
<option key={index} value={index}> | ||
{item.name} | ||
@@ -167,0 +170,0 @@ </option> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
110417
319
12