patternfly-bootstrap-treeview icon indicating copy to clipboard operation
patternfly-bootstrap-treeview copied to clipboard

fixed bug when child is collapsed, but grandsons remains visible

Open alanblins opened this issue 6 years ago • 2 comments

fixed bug when child has state expanded false and levels 5, then the grandsons nodes remains visible. You can see the bug with the code below:

var tree = [
      {
        text: "Parent 1",
        nodes: [
          {
            text: "Child 1",
            state:{expanded:false},
            nodes: [
              {
                text: "Grandchild 1"
              },
              {
                text: "Grandchild 2"
              }
            ]
          },
          {
            text: "Child 2"
          }
        ]
      },
      {
        text: "Parent 2"
      },
      {
        text: "Parent 3"
      },
      {
        text: "Parent 4"
      },
      {
        text: "Parent 5"
      }
    ];
    
       $('#tree').treeview({
           levels:5,
           data: tree});

alanblins avatar Dec 27 '18 22:12 alanblins

Hi, could you please provide a reproducer? Preferably something I can click&run like jsfiddle or codepen.

skateman avatar Dec 27 '18 22:12 skateman

Yes sure. http://plnkr.co/edit/c7CmBNbsRzEZWQaF7bqw?p=info

alanblins avatar Dec 28 '18 13:12 alanblins