react-select-country-list
Advanced tools
Comparing version 2.1.2 to 2.2.0
@@ -62,2 +62,12 @@ class CountryList { | ||
} | ||
native() { | ||
this.nativeData = require('./data-native.json') | ||
this.nativeData.forEach(country => { | ||
this.labelMap[country.label.toLowerCase()] = country.value | ||
this.valueMap[country.value.toLowerCase()] = country.label | ||
}) | ||
return this | ||
} | ||
} | ||
@@ -64,0 +74,0 @@ |
{ | ||
"name": "react-select-country-list", | ||
"version": "2.1.2", | ||
"version": "2.2.0", | ||
"description": "Maps ISO 3166-1-alpha-2 codes to English country names and match react-select options props", | ||
"main": "country-list.js", | ||
"files": [ | ||
"data.json" | ||
"data.json", | ||
"data-native.json" | ||
], | ||
@@ -9,0 +10,0 @@ "dependencies": {}, |
@@ -106,2 +106,7 @@ # react-select-country-list | ||
### native() | ||
You may want to display native name of countries, this is the method for you. | ||
The data source of native names can be found [here](https://annexare.github.io/Countries/) | ||
#### Usage | ||
@@ -118,4 +123,6 @@ ```js | ||
## License | ||
MIT |
36523
6
2058
127