dependent-selects
v0.1.1
Published
An easy way to create asynchronous dependent selects boxes.
Downloads
7
Maintainers
Readme
Dependent Selects
Help you to create dependent selects boxes such as regions (for example, country -> district -> street).
Features
- Asynchronous, based on Promise
- 1.2KB only (min+gzip)
- No UI, so you can (and have to) customize UI by yourself
Usage & Examples
There is an fully example: https://jsfiddle.net/lmk123/8d2x8dLy/
Another example with Vue.js: https://jsfiddle.net/lmk123/40k949en/
Install
npm install dependent-selects --save
In Webpack:
import DependentSelects from 'dependent-selects'
const multi = new DependentSelects(queryFunction)
// ...
In browser:
<script src="node_modules/dependent-selects/dist/dependent-selects.js"></script>
<script>
var multi = new DependentSelects(queryFunction)
// ...
</script>
API
Please see the above examples.
License
MIT