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

Fix lazy loading in Tab component #1827

Closed
1 of 2 tasks
ESadouski opened this issue Jul 17, 2019 · 4 comments · Fixed by #2827
Closed
1 of 2 tasks

Fix lazy loading in Tab component #1827

ESadouski opened this issue Jul 17, 2019 · 4 comments · Fixed by #2827

Comments

@ESadouski
Copy link
Contributor

Issue type

I'm submitting a ... (check one with "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.
-->
@ESadouski
Copy link
Contributor Author

For those who faced this problem, route-tabset can be used as a temporary solution. Or please read angular/angular#13921 (comment)

@maihannijat
Copy link
Contributor

Duplicate of #1820

@yggg yggg added this to To do in Quality via automation Jul 18, 2019
@yggg yggg moved this from To do to Review in progress in Quality Aug 9, 2019
@redriverit
Copy link

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:
<nb-tab tabTitle="Parties" [lazyLoad]="false">

@dmk1111
Copy link

dmk1111 commented Dec 9, 2020

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.

@yggg yggg removed this from Review in progress in Quality Aug 4, 2021
@yggg yggg added this to To do in Now via automation Aug 4, 2021
@evtkhvch evtkhvch self-assigned this Aug 10, 2021
@evtkhvch evtkhvch moved this from To do to In progress in Now Aug 10, 2021
@evtkhvch evtkhvch moved this from In progress to Review in progress in Now Aug 16, 2021
Now automation moved this from Review in progress to Done Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Now
Done
Development

Successfully merging a pull request may close this issue.

6 participants