0👍
✅
You can avoid mutating props using computed
property:
template(v-for="(item) in filteredData")
row(
:item="item"
)
and in javascript code
computed: {
filteredData () {
return this.tableData.filter((data) => data.age === this.selectedScope);
}
}
Source:stackexchange.com