1.0.6 • Published 8 years ago

react-china-city v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

react-china-city Build Status

React integration for china_city

License: MIT

Basic Usage

Ensure you have install peerDependencies

$ npm i react jquery --save

$ npm i react-china-city --save

import ChinaCity from 'react-china-city';

<ChinaCity list={server.city} selected={server.user.city} />

List on server side (rails example)

@list = get_city_list(user.city)

def get_city_list id
  return [ChinaCity.list, nil, nil] if id.nil?
  [
    ChinaCity.list,
    ChinaCity.list("#{id / 1000}000"),
    ChinaCity.list("#{id / 100}00")
  ]
end

More custom

PropTypes

TODO

  • 4 level support (街道)
1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago