Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
v-autocomplete
Advanced tools
Autocomplete component for Vue.js
yarn add v-autocomplete
npm i --save v-autocomplete
import Vue from 'vue'
import Autocomplete from 'v-autocomplete'
// You need a specific loader for CSS files like https://github.com/webpack/css-loader
import 'v-autocomplete/dist/v-autocomplete.css'
Vue.use(Autocomplete)
<!-- Include after Vue -->
<link rel="stylesheet" href="v-autocomplete/dist/v-autocomplete.css"></link>
<script src="v-autocomplete/dist/v-autocomplete.js"></script>
<script>
Vue.use(Autocomplete)
</script>
<!-- in your component -->
<v-autocomplete :items="items" v-model="item" :get-label="getLabel" @updateItems="updateItems">
</v-autocomplete>
// in your component
// ...
data () {
return {
item: {label: 'Item 4', id: 4},
items: []
}
},
methods: {
getLabel (item) {
return item.label
},
updateItems (text) {
yourGetItemsMethod(text).then( (response) => {
this.items = response
})
}
},
// ...
Name | Type | Required | Default value | Info |
---|---|---|---|---|
items | Array | Yes | List items | |
componentItem | Vue Component or Function or String | No | Item | Template of item list |
placeholder | String | No | ||
minLen | Number | No | 3 | Min length to input search call 'updateItems' event |
wait | String | No | 500 | Wait of input change before call 'updateItems' event |
getLabel | Function | No | function(item) { return item } | Custom function to extract label of item |
value | Mixed | No | Initial value (use v-model) |
This project is licensed under MIT License
FAQs
Autocomplete component for Vue.js
The npm package v-autocomplete receives a total of 946 weekly downloads. As such, v-autocomplete popularity was classified as not popular.
We found that v-autocomplete demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.