angular-tree-component icon indicating copy to clipboard operation
angular-tree-component copied to clipboard

Tree is not rendered when is not in active tab

Open jgolebiewski opened this issue 9 years ago • 9 comments

Angular version: 4.0.1 TreeComponent version: 3.2.4

If tree is not on the first tab (angular material) then is not rendered - tree-node-collection element is empty - otherwise works fine.

jgolebiewski avatar Apr 06 '17 18:04 jgolebiewski

Facing the same issue with Angular4 Support changes.

ghost avatar Apr 07 '17 06:04 ghost

I agree this is not working again. I experienced this here #227

Gillardo avatar Apr 07 '17 09:04 Gillardo

Here is an example demonstrating the issue:

TreeExample.zip

SmartieCodes avatar Apr 07 '17 09:04 SmartieCodes

Similar issue here. With Angular 4.0.1 and 3.2.4, the tree is not rendering. With 3.2.3, it is working fine. I have this behaviour on an active tab/view as well.

michaelkleinhenz avatar Apr 11 '17 08:04 michaelkleinhenz

@500tech-user any news on this?? I added example to show issue

Gillardo avatar Apr 13 '17 14:04 Gillardo

For me this is happening when the tree is in a bootstrap modal dialog. Reverting to 3.2.3 fixed it for me

dhilgarth avatar Apr 13 '17 17:04 dhilgarth

OK I did 2 things:

  1. Solve this automatically for trees not using virtual scroll
  2. For trees using virtual scroll - need to call sizeChanged() on tree component if it became visible or changed it's size (for example when switching to the tab, or displaying a modal).

For example if using with bootstrap tabs:

  <tab heading="Tab 2" (select)="onSelectTab()">

  onSelectTab() {
    setTimeout(() => {
      this.treeComponent.sizeChanged();
    });
  }

Will be released in coming version

adamkleingit avatar Apr 17 '17 16:04 adamkleingit

Fixed in 3.3.0

adamkleingit avatar Apr 17 '17 17:04 adamkleingit

Hi, When will this be available on npm? Right now the latest is 3.3.1

adrian-mitangi avatar Apr 21 '17 17:04 adrian-mitangi