Autocomplete With Live Filter – Advanced Search

Advanced Search is a Vue.js autocomplete component for both single and multiple select boxes.

How to use it:

1. Import the Advanced Search component.

import Advanced-Search from 'vue-advanced-search'

2. Add the necessary stylesheet to the app.

<style src="vue-advanced-search/dist/AdvancedSearch.css"></style>

3. Register the component and define the suggestions for the autocomplete list.

export default {
  components: { AdvancedSearch },
  data () {
    return {
      model: null,
      options: [
        { label: 'vue', value: 'vue' },
        { label: 'script', value: 'script' },
        { label: 'com', value: 'com' },
      ]
    }
  }
}

4. Add the component to the app template.

// Single Select
<advanced-search
  v-model="model"
  :options="options"
>
</advanced-search>
// Multiple Select
<advanced-search
  v-model="model"
  :options="options"
  select
  multiple
>
</advanced-search>

5. All possible component props.

value: {
  type: [String, Array],
  default: () => [] || '',
  required: true
},
options: {
  type: Array,
  required: true
},
placeholder: {
  type: String,
  required: false,
  default: 'Search'
},
selectMode: {
  type: Boolean,
  required: false,
  default: false
},
multiple: {
  type: Boolean,
  required: false,
  default: false
}

Preview:

Autocomplete With Live Filter - Advanced Search

Download Details:

Author: antonispat10

Live Demo: /demo/autocomplete-advanced-search

Download Link: https://github.com/antonispat10/vue-advanced-search/archive/master.zip

Official Website: https://github.com/antonispat10/vue-advanced-search

Install & Download:

# NPM
$ npm i vue-advanced-search --save

Add Comment