Advertisement
vitareinforce

compact filtered

Jan 29th, 2021
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. computed: {
  2. filtered() {
  3. let result
  4. let newdata = []
  5. for(let i = 0; i< this.data.length; i++) {
  6. if(this.cekKondisi(this.data[i])) {
  7. newdata.push(this.data[i])
  8. }
  9. }
  10. if(this.filterGroup == '') {
  11. result = newdata
  12. } else {
  13. result = newdata.filter(x => x.group_id == this.filterGroup)
  14. }
  15. return result
  16. }
  17. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement