0👍
✅
You should modify the data property transactions
instead of updating computed one because it’s not correct what you’re doing since computed properties are not mutable, so your function should be like :this.sortedTransactions = search;
searchResults() {
const search = this.transactions.filter(transaction => {
return transaction.user_id.toLowerCase() === this.searchTable
});
this.transactions = search;
}
and the computed
property sortedTransactions
will be updated automatically
0👍
Define serchResults() in your method, listen to @key event, and pass it to the method to filter result.
Source:stackexchange.com