react-country-region-selector
Advanced tools
Comparing version 1.4.2 to 1.4.3
{ | ||
"name": "react-country-region-selector", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "CountryDropdown and RegionDropdown React components for your forms.", | ||
"author": "benkeen", | ||
"author": "country-regions", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/benkeen/react-country-region-selector.git" | ||
"url": "https://github.com/country-regions/react-country-region-selector.git" | ||
}, | ||
@@ -39,3 +39,3 @@ "main": "dist/rcrs.js", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"country-region-data": "1.4.4", | ||
"country-region-data": "1.4.5", | ||
"cross-env": "^5.1.4", | ||
@@ -42,0 +42,0 @@ "enzyme": "^3.6.0", |
@@ -23,3 +23,3 @@ # react-country-region-selector | ||
This library provides a pair of React components to display a connected country and region dropdowns. If you're not using React, check out the [plain vanilla JS version](https://github.com/country-regions/country-region-selector) of the library instead. The list of countries and regions is maintained separately and found in the [country-region-data](https://github.com/country-regions/country-region-data) repo. | ||
This library provides a pair of React components to display _connected_ country and region dropdowns (pick a country, it shows the relevant regions). If you're not using React, check out the [plain vanilla JS version](https://github.com/country-regions/country-region-selector) instead. The list of countries and regions is maintained separately and found in the [country-region-data](https://github.com/country-regions/country-region-data) repo. | ||
@@ -60,4 +60,7 @@ | ||
Using npm or yarn: | ||
```javascript | ||
npm i react-country-region-selector | ||
yarn add react-country-region-selector | ||
``` | ||
@@ -69,6 +72,6 @@ | ||
It's very easy to use, but note that you will need to track the country and region value somewhere - either in your | ||
component state or off in a store somewhere. Here's a simple example that uses state: | ||
component state or in a store somewhere. Here's a simple example that uses state: | ||
```javascript | ||
import React from 'react'; | ||
import React, { Component } from 'react'; | ||
@@ -80,3 +83,3 @@ // note that you can also export the source data via CountryRegionData. It's in a deliberately concise format to | ||
class Example extends React.Component { | ||
class Example extends Component { | ||
constructor (props) { | ||
@@ -112,7 +115,10 @@ super(props); | ||
Generally you don't need `CountryRegionData`, but should you need it, the raw data is accessible like in the above example. | ||
<a name="options"></a> | ||
### Options | ||
These are the attributes that can be explicitly passed to the two components. _Note: any other arbitrary attributes will be | ||
added to the actual DOM element._ | ||
These are the attributes that can be passed to the two components. _Note: any other attributes that aren't | ||
specified here will be added directly to the `<select>` DOM element._ | ||
@@ -165,3 +171,3 @@ | ||
Check out the `scripts` section of the package.json file to see them all, but these are the higlights: | ||
Check out the `scripts` section of the package.json file to see them all, but these are the highlights: | ||
@@ -177,2 +183,5 @@ - `npm start` - regenerate everything, plus a watcher for local development. | ||
- `1.4.3` - Dev 2, 2018: | ||
- RegionDropdown converted to PureComponent; now updates on any prop change | ||
- [country region data](https://github.com/country-regions/country-region-data) updated to 1.4.5 | ||
- `1.4.2` - Nov 8, 2018: | ||
@@ -179,0 +188,0 @@ - `customOptions` setting added for the Region dropdown. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
228
215714
1476