Nebular: Fix lazy loading in Tab component

Created on 17 Jul 2019  路  4Comments  路  Source: akveo/nebular

Issue type

I'm submitting a ... (check one with "x")

  • [x] bug report
  • [ ] feature request

Issue description

Current behavior:
Lazy loading doesn't work. Content loaded even if it's not active

Expected behavior:
When tab marked as lazy-loaded it should be initialized only when its active

Steps to reproduce:
Mark tab as lazy=true

Related code:

  @Input()
  set lazyLoad(val: boolean) {
    this.init = convertToBoolProperty(val);
  }

Other information:

npm, node, OS, Browser

<!--
Node, npm: `node --version` and `npm --version`
OS: Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
Browser: Chrome/Safari/Firefox/etc?
-->

Angular, Nebular

<!--
Check your `package-lock.json` or locate a `package.json` in the `node_modules` folder.
-->
important bug quality

Most helpful comment

Any Update on this? I am seeing all content within my tabs load instantly and not when the tab is active. As mentioned above [lazyLoad] does not change the functionality:

All 4 comments

For those who faced this problem, route-tabset can be used as a temporary solution. Or please read https://github.com/angular/angular/issues/13921#issuecomment-272660678

Duplicate of #1820

Any Update on this? I am seeing all content within my tabs load instantly and not when the tab is active. As mentioned above [lazyLoad] does not change the functionality:

Hi, guys! Any update on this? For now, with [lazyLoad]="false" content is not rendered in the template but all hooks (calls to backend, etc) in child components are still executed. Is there a way to restrict this completely until tab is selected first time? This is pretty annoying in case we have a lot of tabs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dragonbane0 picture dragonbane0  路  3Comments

bnbs picture bnbs  路  4Comments

ChristianVega5421 picture ChristianVega5421  路  3Comments

obarazan picture obarazan  路  3Comments

suku-h picture suku-h  路  3Comments