0
I am making a search filter with Vue.js and in my filter I would like to search name and email, but I only managed to do with the name of the user, how to put another "argument".
The code is like this
computed: {
filteredUsers: function(){
return this.userLists.filter((userList) => {
return userList.usuario.toLowerCase().match(this.search.toLowerCase());
});
}
},
I wish it were something like
return userList.usuario.toLowerCase().match(this.search.toLowerCase()) || userList.email.toLowerCase().match(this.search.toLowerCase()) ;