Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree is not rendered when is not in active tab #239

Closed
jgolebiewski opened this issue Apr 6, 2017 · 9 comments
Closed

Tree is not rendered when is not in active tab #239

jgolebiewski opened this issue Apr 6, 2017 · 9 comments

Comments

@jgolebiewski
Copy link

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.

@ghost
Copy link

ghost commented Apr 7, 2017

Facing the same issue with Angular4 Support changes.

@Gillardo
Copy link

Gillardo commented Apr 7, 2017

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

@LeahPike
Copy link

LeahPike commented Apr 7, 2017

Here is an example demonstrating the issue:

TreeExample.zip

@michaelkleinhenz
Copy link

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.

@Gillardo
Copy link

Gillardo commented Apr 13, 2017

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

@dhilgarth
Copy link

dhilgarth commented Apr 13, 2017

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

@adamkleingit
Copy link
Contributor

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
Copy link
Contributor

Fixed in 3.3.0

@adrian-mitangi
Copy link

adrian-mitangi commented Apr 21, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants