Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
AUI-3200 Fix tree is built without children nodes (aui-tree-view) reg…
Browse files Browse the repository at this point in the history
…ression of AUI-3196 Prevent tree to create empty container <ul></ul> with no children, remove previous condition and add ul element only when is expanded (has children's).
  • Loading branch information
georgel-pop-lr committed Jun 25, 2021
1 parent fcaf9a7 commit 8a2b8f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/aui-tree/js/aui-tree-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ A.mix(TreeData.prototype, {

instance.childrenLength = v.length;

if (instance.childrenLength && !container) {
if (!container) {
container = instance._createNodeContainer();
}

Expand Down
6 changes: 1 addition & 5 deletions src/aui-tree/js/aui-tree-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,11 +569,7 @@ var TreeNode = A.Component.create({

var nodeContainer = instance.get('container');

if (nodeContainer) {
if (!instance.get('expanded')) {
nodeContainer.hide();
}

if (nodeContainer && instance.get('expanded')) {
boundingBox.append(nodeContainer);
}

Expand Down

0 comments on commit 8a2b8f1

Please sign in to comment.