0👍
It’s because you’re in a different scope at this point.
You can keep a reference to this
though.
filteredList() {
const vm = this; // obviously doesn't have to be called vm. Choose whatever name you like
return cards.filter((el) => // <-- Your `this`-scope breaks here
{
return el.Name.toLowerCase().includes("an"); //this one works
return el.Name.toLowerCase().includes(vm.searchInLowerCase); <-- use reference here
return el.Name.toLowerCase().includes(vm.search); <-- and here
})
}
- [Vuejs]-How to match Node.js server's ESLint rules to my Vue.js frontend's ESLint rules?
- [Vuejs]-Default Options for Prop in VueJS
Source:stackexchange.com