https://github.com/ablypl/lari-select
https://github.com/ablypl/lari-select
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ablypl/lari-select
- Owner: ablypl
- License: mit
- Created: 2016-10-12T09:02:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-22T15:16:35.000Z (over 8 years ago)
- Last Synced: 2025-02-15T16:50:42.445Z (4 months ago)
- Language: Vue
- Size: 15.6 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lari Select
Select component for vuejs [Demo] (http://select.lari.pl/)
## Installation
```
$ npm install lari-select --save
```## Examples
### Single Select
```vue
import { LariSelect } from 'lari-select'
export default {
components: {
LariSelect
}
}```
### Multiple
```vue
import { LariMultiselect } from 'lari-select'
export default {
components: {
LariMultiselect
}
}```
## Docs
#### Single selected
Available props:
* **url: { default: '/tags'}** - url for remote results and store new records (RESTFul Resource)
* **field: { default: 'name' }** - variable from object to display. Eg. If your object looks like **{ id: 1, title: "test title" }** you should change it into 'title';
* **name: {}** - input field name. For multiple select its an array, so you dont need to include '[]'
* **return: { default: 'id'}** - field to return to input as a value
* **resources: { default: false }** - available options. Array of objects. You should define it when you don't want to query remote data.
* **selected : {}** - current item. For single select provide an object, for multipleselect provide an array of ids
* **withcreate: { default: true }** - allow users to create new resources.
* **labels: {}** - Provide an object of labels. Eg. { placeholder: "Select new element" }. Available options:
* Single select
* placeholder: default **"Select element"**
*Multiple select
* add: default **"Add tags"**,
* clear: default **"Clear tags"**,
* delete: default **"Delete all elements?"**,
* yes: default **"Yes"**,
* no: default **"No"**
* General:
* typeText: default **"Type element name"**,
* create: default **"Create"**,
* no_resuts: default **"No results"**,
* search: default **"Search**"## Badges

---