JSFiddle - React, Tailwind, and code Playground
by femfoyou
HTML
<input type="text" v-model="searchTerm">
<ul>
<li v-for="item in items | filterBy searchKey">{{item}}</li>
</ul>
JavaScript
new Vue({
el: 'body',
data: {
items: ['á', 'a', 'b'],
searchTerm: ''
},
computed: {
searchKey: function() {
if(this.searchTerm == 'a')
return 'á'
return this.searchTerm
}
}
})