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

nb-tabset lazyLoad and (changeTab) not working #1820

Closed
1 task
maihannijat opened this issue Jul 16, 2019 · 1 comment · Fixed by #2827
Closed
1 task

nb-tabset lazyLoad and (changeTab) not working #1820

maihannijat opened this issue Jul 16, 2019 · 1 comment · Fixed by #2827

Comments

@maihannijat
Copy link
Contributor

maihannijat commented Jul 16, 2019

Issue type

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

  • [x ] bug report
  • feature request

Issue description

I have nb-tabset with two tabs and one component in each tab. I want to lazy load the second component. The second component makes API call and I want to make that only if user clicks on the tab or the tab become active. The [lazyLoad]="{{true}}" or lazyLoad decorators do not work. Tried (changeTab) event or (click) but these do not fire either.

Current behavior:
lazyLoad loads component instantly.
(changeTab) and click do not fire.

Expected behavior:
lazyLoad loads content when the tab is active and (changeTab) and (click) events should fire.

Related code:

<nb-tab tabTitle="Map">
  <div class="row">
    <div class="col-md-6">
      <app-field-info></app-field-info>
      <app-field-forecast></app-field-forecast>
    </div>
    <div class="col-md-6">
      <app-map></app-map>
    </div>
  </div>
</nb-tab>
<nb-tab tabTitle="Calendar" (changeTab)="displayCalendar()" lazyLoad>
  <app-calendar *ngIf="isCalendarActive"></app-calendar>
</nb-tab>
</nb-tabset>

Other information:

Angular, Nebular

Angular 8 and Nebular 4.1.2
@alexandr-efimov
Copy link

looks like it is still actual :(

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

Successfully merging a pull request may close this issue.

3 participants