Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chemzqm/tree-select
A simple tree select component looks like select2
https://github.com/chemzqm/tree-select
Last synced: about 1 month ago
JSON representation
A simple tree select component looks like select2
- Host: GitHub
- URL: https://github.com/chemzqm/tree-select
- Owner: chemzqm
- Created: 2013-09-09T19:06:47.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-21T09:07:50.000Z (about 11 years ago)
- Last Synced: 2024-10-29T10:44:50.846Z (about 2 months ago)
- Language: CSS
- Size: 355 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# tree-select
A simple tree select component
[Demo](http://chemzqm.github.io/tree-select/index.html)
## Installation
Install with [component(1)](http://component.io):
$ component install chemzqm/tree-select
## Events
* `change` value change, with value as first argumant.
## API
### new TreeSelect(el, data)
* `el` hidden input element.
* `data` should contain objects with `id` and `text` attributes or `name `and `values` attributes for unselectable group element.
### .placeholder(text)
Set placeholder with `text`.
### .selectDefault()
Select the first value as default.
### .value([value])
Get or set the value.
### .rebuild(data)
Reset all the options with `data`.
### .remove()
Destroy the TreeSelect instance.
### .reset()
## License
MIT