1👍
Simplest way is to use a computed property:
computed: {
employeeTableData() {
return this.employeesArray.map(e => {
return {
email: e.email,
name: this.getName(e),
phone: this.getPhone(e),
};
});
},
},
Then change v-data-table
to use employeeTableData
instead and directly reference the attributes.
You can then search XD
or 666-
and it will correctly filter on name and phone number.
👤xlm
- [Vuejs]-Change the background color of a list item in Vuetify
- [Vuejs]-Custom Searchbox for vue-table-2
Source:stackexchange.com