2👍
✅
You can just use a variable in your v-for
attribute:
v-for item in items | filterBy id in 'id'
var vm = new Vue({
...
data:function() {
return {
id:1
}
}
}
Then you could use v-model
on an input like text or select, and set the id there:
<input v-model="id"> <!-- Filter to the id inputted here -->
A few examples here: https://vuejs.org/api/#filterBy
👤Jeff
Source:stackexchange.com