2.3.5 • Published 2 months ago

vue-basic-autocomplete v2.3.5

Weekly downloads
11
License
MIT
Repository
-
Last release
2 months ago

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

PropTypeDefaultDescription
optionsArray (required)Array of items to autocomplete
minlengthNumber1Min. length to start listing. If set to 0, all options will be listed on focus
none-findStringNo matching resultsDefault label when there are no matching results
trackbyStringRequired when you are using an array of objects
placeholderStringPlaceholder
disabledBooleanfalse
list-max-heightString300Max-heigth in px
input-classStringCustom CSS class for the input. Since I am using Bootstrap, I set it as 'form-control'
clear-btnBooleanfalseShows a clear button appended to the input

Events

EventDescription
selectedTriggers when you select any item
2.3.5

2 months ago

2.3.4

3 years ago

2.3.3

3 years ago

2.3.2

4 years ago

2.3.1

4 years ago

2.3.0

4 years ago

2.2.2

4 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.9

5 years ago

2.0.8

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago