Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-country-state-city

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-country-state-city - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

2

package.json
{
"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>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc