Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added treeitem role to tree items. Updated a few devDependencies. #182

Merged
merged 8 commits into from
Dec 20, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Auto fix by the linter
  • Loading branch information
Isaac Vargas committed Dec 19, 2019
commit 8aff67df2abde6f73b961486e8fa0f251c4d5c8f
14 changes: 7 additions & 7 deletions src/components/TreeNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
<ul
v-if="hasChildren() && node.states.expanded"
class="tree-children"
>
<node
v-for="child in visibleChildren"
:key="child.id"
:node="child"
:options="options"
/>
>
<node
v-for="child in visibleChildren"
:key="child.id"
:node="child"
:options="options"
/>
</ul>
</transition>
</li>
Expand Down
36 changes: 18 additions & 18 deletions src/components/TreeRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,6 @@
default: 'div'
}
},
watch: {
filter (term) {
this.tree.filter(term)
}
},
computed: {
visibleModel() {
return this.model.filter(function(node) {
return node && node.visible()
})
},

visibleMatches() {
return this.matches.filter(function(node) {
return node && node.visible()
})
}
},
data () {
// we should not mutating a prop directly...
// that's why we have to create a new object
Expand All @@ -152,6 +134,24 @@
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) {
Expand Down