+
@@ -97,6 +97,9 @@ export default {
},
nodeTouched: false,
toggleClicked: false,
+ mounted() {
+ this.setAllNodesTabIndexes();
+ },
methods: {
toggle() {
this.$emit('node-toggle', this.node);
@@ -280,7 +283,7 @@ export default {
},
setTabIndexForSelectionMode(event, nodeTouched) {
if (this.selectionMode !== null) {
- const elements = [...DomHandler.find(this.$refs.currentNode.parentElement, '[data-pc-section="node"]')];
+ const elements = [...DomHandler.find(this.$refs.currentNode.parentElement, '[data-pc-section="treeitem"]')];
event.currentTarget.tabIndex = nodeTouched === false ? -1 : 0;
@@ -387,7 +390,7 @@ export default {
getParentNodeElement(nodeElement) {
const parentNodeElement = nodeElement.parentElement.parentElement;
- return DomHandler.getAttribute(parentNodeElement, '[data-pc-section="node"]') ? parentNodeElement : null;
+ return DomHandler.getAttribute(parentNodeElement, '[data-pc-section="treeitem"]') ? parentNodeElement : null;
},
focusNode(element) {
element.focus();
@@ -396,7 +399,7 @@ export default {
return this.selectionMode === 'checkbox';
},
isSameNode(event) {
- return event.currentTarget && (event.currentTarget.isSameNode(event.target) || event.currentTarget.isSameNode(event.target.closest('[data-pc-section="node"]')));
+ return event.currentTarget && (event.currentTarget.isSameNode(event.target) || event.currentTarget.isSameNode(event.target.closest('[data-pc-section="treeitem"]')));
}
},
computed: {