From 3c35a6ef4bf4014124efd176ffa8ae45e2f777d7 Mon Sep 17 00:00:00 2001 From: Carlo Barone Date: Fri, 25 Oct 2024 15:09:46 +0200 Subject: [PATCH] fix: treenode component instead of label --- cosmoz-treenode-button-view.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cosmoz-treenode-button-view.js b/cosmoz-treenode-button-view.js index dd91db6..6ab3cfc 100644 --- a/cosmoz-treenode-button-view.js +++ b/cosmoz-treenode-button-view.js @@ -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. @@ -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); @@ -437,7 +438,7 @@ class CosmozTreenodeButtonView extends translatable(PolymerElement) { timeOut.after(50), // 5 was enough during test () => { this.$.dialogTree.fit(); - }, + } ); }