vue-basic-autocomplete
A Vue.js autocomplete component. Compatible with Vue 2.x.
1,425
2
| Install | |
|---|---|
npm install vue-basic-autocomplete |
|
| Latest Version: | 2.3.5 |
| Vue: | 2 |
| License: | MIT |
| Last Updated: | Mar 21, 2024 |
| Links: | GitHub · npm |
Maintainer: ovictorpereira
vue-basic-autocomplete
A Vue.js autocomplete component. Compatible with Vue 2.x.
Sandbox
Installation
NPM
$ npm install vue-basic-autocomplete --save
Register the component
import Vue from 'vue'
import VueBasicAutocomplete from 'vue-basic-autocomplete'
Vue.use(VueBasicAutocomplete)
Usage
<vue-basic-autocomplete v-model="result" :options="myArray" trackby="name" input-class="form-control" />
new Vue({
data: {
myArray: [
{name: 'Mariah', id: 1},
{name: 'Josh Daves', id: 2},
{name: 'John Sec', id: 3},
{name: 'Robertson Daves', id: 4},
],
result: ''
}
})
Available props
| Prop | Type | Default | Description |
|---|---|---|---|
| options | Array (required) | Array of items to autocomplete | |
| minlength | Number | 1 | Min. length to start listing. If set to 0, all options will be listed on focus |
| none-find | String | No matching results | Default label when there are no matching results |
| trackby | String | Required when you are using an array of objects | |
| placeholder | String | Placeholder | |
| disabled | Boolean | false | |
| list-max-height | String | 300 | Max-heigth in px |
| input-class | String | Custom CSS class for the input. Since I am using Bootstrap, I set it as 'form-control' | |
| clear-btn | Boolean | false | Shows a clear button appended to the input |
Events
| Event | Description |
|---|---|
| selected | Triggers when you select any item |
Related Packages
vue-search-select-css
A Vue.js search select form component that allows css customizations (based on v...
1,602
1
vs-autocomplete
Nested-Autocomplete-Multiselect-Dropdown for Vue 3, refer GitHub branch v2 for u...
1,893
2
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 2.3.5 | ^2.6.10 | MIT | |
| 2.3.4 | ^2.6.10 | MIT | |
| 2.3.3 | ^2.6.10 | MIT | |
| 2.3.2 | ^2.6.10 | MIT | |
| 2.3.1 | ^2.6.10 | MIT | |
| 2.3.0 | ^2.6.10 | MIT | |
| 2.2.2 | ^2.6.10 | MIT | |
| 2.2.1 | ^2.6.10 | MIT | |
| 2.2.0 | ^2.6.10 | MIT | |
| 2.1.1 | ^2.6.10 | MIT | |
| 2.1.0 | MIT | ||
| 2.0.9 | MIT | ||
| 2.0.8 | MIT | ||
| 2.0.7 | MIT | ||
| 2.0.6 | MIT | ||
| 2.0.5 | MIT | ||
| 2.0.4 | MIT | ||
| 2.0.3 | MIT | ||
| 2.0.2 | MIT | ||
| 2.0.1 | MIT | ||
| 2.0.0 | MIT | ||
| 1.0.4 | MIT | ||
| 1.0.3 | MIT | ||
| 1.0.2 | MIT | ||
| 1.0.1 | MIT | ||
| 1.0.0 | MIT |