Skip to content

Commit

Permalink
removed duplicated watcher on filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Vargas committed Dec 19, 2019
1 parent 8aff67d commit 7daa45c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/TreeRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
default: 'div'
}
},
data () {
// we should not mutating a prop directly...
// that's why we have to create a new object
Expand All @@ -134,30 +135,25 @@
draggableNode: null
}
},
computed: {
visibleModel() {
return this.model.filter(function(node) {
return node && node.visible()
})
},
visibleMatches() {
return this.matches.filter(function(node) {
return node && node.visible()
})
}
},
watch: {
filter (term) {
this.tree.filter(term)
}
},
watch: {
filter (term) {
this.tree.filter(term)
}
}
}
</script>

Expand Down

0 comments on commit 7daa45c

Please sign in to comment.