Skip to content

Commit

Permalink
fix: treenode component instead of label
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloBar1 committed Oct 25, 2024
1 parent 4cafbfc commit 3c35a6e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cosmoz-treenode-button-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ class CosmozTreenodeButtonView extends translatable(PolymerElement) {
}
return pathParts
.filter((n) => n)
.map((part) => part[this.tree.searchProperty]);
.map((part) => part[this.tree.searchProperty])
.join(' / ');
}
/**
* Get text from a node to set on a node chip.
Expand Down Expand Up @@ -387,20 +388,20 @@ class CosmozTreenodeButtonView extends translatable(PolymerElement) {

this.selectedNode = getNode(
this.highlightedNodePath || this.nodePath,
this.tree,
this.tree
);
if (this.highlightedNodePath) {
this.nodePath = this.highlightedNodePath;
}
this.nodesOnNodePath = getTreePathParts(
this.highlightedNodePath || this.nodePath,
this.tree,
this.tree
);

if (this.multiSelection) {
if (
!this.selectedNodes.some(
(node) => node.pathLocator === this.highlightedNodePath,
(node) => node.pathLocator === this.highlightedNodePath
)
) {
this.push('selectedNodes', this.selectedNode);
Expand Down Expand Up @@ -437,7 +438,7 @@ class CosmozTreenodeButtonView extends translatable(PolymerElement) {
timeOut.after(50), // 5 was enough during test
() => {
this.$.dialogTree.fit();
},
}
);
}

Expand Down

0 comments on commit 3c35a6e

Please sign in to comment.