Loading src/components/CollectionsTree.vue +13 −6 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ export default { data() { return { highlightedNode: null, simulateClick: false, //simulateClick: false, } }, mounted() { Loading @@ -60,11 +60,14 @@ export default { currentCollection(){ if (this.highlightedNode && this.highlightedNode.id !== this.currentCollection.id) { if (this.currentCollection.id == this.currentRootCollectionId) {//home clicked document.querySelectorAll('.v-treeview-node--active') .forEach((elt) => elt.classList.remove('v-treeview-node--active'))//desactive current active /*if (this.currentCollection.id === this.currentRootCollectionId) {//home clicked this.highlightedNode = null; document.querySelectorAll('.v-treeview-node--active') .forEach((elt) => elt.classList.remove('v-treeview-node--active'))//desactive current active } else {//collection was loaded but from external action (no click on treeview) } */ /*else {//collection was loaded but from external action (no click on treeview) this.simulateClick = true; try { const target = document.querySelector('#tree-item-' + this.currentCollection.id) Loading @@ -75,7 +78,7 @@ export default { // eslint-disable-next-line no-empty catch (e) { } } }*/ } } Loading @@ -83,8 +86,9 @@ export default { methods: { async collectionClicked(c) { this.highlightedNode = c; if (this.simulateClick) return; // if (this.simulateClick) { // return; // } await this.fetchCollectionTree(c.id); this.$emit('tree-collection-selected', c.id); }, Loading @@ -94,6 +98,9 @@ export default { this.highlightedNode = values[0]; this.$emit('tree-collection-selected', values[0].id) } else{ console.log("VALUES != 1", values.length, 'inactive!') } }, loadHome() { Loading Loading
src/components/CollectionsTree.vue +13 −6 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ export default { data() { return { highlightedNode: null, simulateClick: false, //simulateClick: false, } }, mounted() { Loading @@ -60,11 +60,14 @@ export default { currentCollection(){ if (this.highlightedNode && this.highlightedNode.id !== this.currentCollection.id) { if (this.currentCollection.id == this.currentRootCollectionId) {//home clicked document.querySelectorAll('.v-treeview-node--active') .forEach((elt) => elt.classList.remove('v-treeview-node--active'))//desactive current active /*if (this.currentCollection.id === this.currentRootCollectionId) {//home clicked this.highlightedNode = null; document.querySelectorAll('.v-treeview-node--active') .forEach((elt) => elt.classList.remove('v-treeview-node--active'))//desactive current active } else {//collection was loaded but from external action (no click on treeview) } */ /*else {//collection was loaded but from external action (no click on treeview) this.simulateClick = true; try { const target = document.querySelector('#tree-item-' + this.currentCollection.id) Loading @@ -75,7 +78,7 @@ export default { // eslint-disable-next-line no-empty catch (e) { } } }*/ } } Loading @@ -83,8 +86,9 @@ export default { methods: { async collectionClicked(c) { this.highlightedNode = c; if (this.simulateClick) return; // if (this.simulateClick) { // return; // } await this.fetchCollectionTree(c.id); this.$emit('tree-collection-selected', c.id); }, Loading @@ -94,6 +98,9 @@ export default { this.highlightedNode = values[0]; this.$emit('tree-collection-selected', values[0].id) } else{ console.log("VALUES != 1", values.length, 'inactive!') } }, loadHome() { Loading