vue-simple-search-dropdown
Vue.js simple autocomplete dropdown component.
No external library is used in this dropdown.
Installation
Browser
Include the script file, then install the component with Vue.use(Dropdown);
e.g.:
Module
Usage
Once installed, it can be used in a template as simply as:
Options
options
(required): An array of options withid
andname
placeholder
(optional): A placeholderdisabled
(optional): true/falsename
(optional): An input name | default:dropdown
maxItem
(optional): Max item to show | default:6
Events
These events are returned from the dropdown and can be catch with v-on
selected
: An option is selected by click in the dropdownfilter
: A filter has been applied by typing in the input field
Tips: Using v-on:filter
, you can repopulate the dropdown with new options
corresponding to the search by making an API call