Package Exports
- react-distpicker
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-distpicker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-distpicker
react-distpickeris a Chinese district picker for react, inspiring from Distpicker
Demo
https://aneureka.github.io/react-distpicker/
Getting started
Install
npm install react-distpicker -Sor
yarn add react-distpicker -SCreate component
import DistPicker from 'react-distpicker';
const App = () => (
<DistPicker />
);
export default App;You can have a glance in /examples.
Options
| Property | Description | Type | Default value |
|---|---|---|---|
| placeholderProvince | placeholder for province selector | string | —— 省 —— |
| placeholderCity | placeholder for city selector | string | —— 市 —— |
| placeholderDistrict | placeholder for district selector | String | —— 区 —— |
| pickerClass | class for the Distpicker, mainly used to change the style | String | |
| selectClass | class for the select component in DistPicker, mainly used to change the style | String | |
| onSelect | the callback function while selecting, receiving an object including province, city and district | func |
Contributor
License
The plugin is open-sourced software licensed under the MIT license.