Angular-tree-component: Tree is not rendered when is not in active tab

Created on 6 Apr 2017  路  9Comments  路  Source: CirclonGroup/angular-tree-component

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.

bug Priority

Most helpful comment

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

All 9 comments

Facing the same issue with Angular4 Support changes.

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

Here is an example demonstrating the issue:

TreeExample.zip

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.

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

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

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

Fixed in 3.3.0

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CC84 picture CC84  路  4Comments

hipresario picture hipresario  路  4Comments

Shadowlauch picture Shadowlauch  路  5Comments

salilbajaj picture salilbajaj  路  4Comments

Gillardo picture Gillardo  路  5Comments