Basic status and role filtering, not reactive

This commit is contained in:
Montana
2018-10-25 14:46:24 -04:00
parent 6ab4867d3c
commit 1d1b549531
2 changed files with 22 additions and 8 deletions

View File

@@ -9,6 +9,8 @@ export default {
data: function () {
return {
searchValue: '',
status: '',
role: '',
searchedList: [],
}
},
@@ -23,6 +25,18 @@ export default {
member => member.name.toLowerCase()
.includes(this.searchValue.toLowerCase())
)
if (this.status) {
this.searchedList = this.searchedList.filter(
member => member.status === this.status
)
}
if (this.role) {
this.searchedList = this.searchedList.filter(
member => member.role.toLowerCase() === this.role
)
}
},
},
}