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(tabset): lazy loading #2827

Merged
merged 29 commits into from
Nov 15, 2021
Merged

Conversation

evtkhvch
Copy link
Contributor

@evtkhvch evtkhvch commented Aug 13, 2021

Please read and mark the following check list before creating a pull request:

Short description of what this resolves:

Closes #1827
Closes #1820

  • add nbTabContent directive
  • lazyLoad property in NbTabComponent is deprecated
  • init property in NbTabComponent is deprecated

how to use:

<nb-tab tabTitle="title">
  <ng-template nbTabContent>
    ...content
  </ng-template>
</nb-tab>

@evtkhvch evtkhvch marked this pull request as ready for review August 16, 2021 07:08
@evtkhvch evtkhvch requested a review from yggg November 11, 2021 15:37
@yggg yggg added this to the 9.0.0 milestone Nov 12, 2021
@yggg yggg changed the title fix(tabset): lazy load fix(tabset): lazy loading Nov 15, 2021
@yggg yggg merged commit a51513c into akveo:master Nov 15, 2021
@ghost
Copy link

ghost commented Mar 31, 2022

@yggg @evtkhvch Maybe I misunderstood, but the example still doesn't work for me.

      <nb-tabset fullWidth>
        <nb-tab tabTitle="Allgemein" i18n-label="@@contractorEditDetailTabLabel" [active]='true'>
          <ng-template nbTabContent>
            {{ getPartialState$('details') | async | json }}
          </ng-template>
        </nb-tab>
        <nb-tab tabTitle="Logs" i18n-label="@@contractorEditLogTabLabel">
          <ng-template nbTabContent>
            {{ getPartialState$('logs') | async | json }}
          </ng-template>
        </nb-tab>
      </nb-tabset>

Will still resolve both observables :/

@mikejobson
Copy link

mikejobson commented Apr 5, 2022

This doesn't work for me either. All the the content in the individual components gets loaded when the whole tabset does

<nb-tabset>
  <nb-tab tabIcon="monitor-outline" tabTitle="Video Routing">
    <app-video-routing *nbTabContent></app-video-routing>
  </nb-tab>
  <nb-tab tabIcon="mic-outline" tabTitle="Mics">
    <app-mic-levels *nbTabContent></app-mic-levels>
  </nb-tab>
  <nb-tab tabIcon="settings-outline" tabTitle="Settings">
    <app-settings *nbTabContent></app-settings>
  </nb-tab>
</nb-tabset>

@ghost
Copy link

ghost commented Apr 5, 2022

@mikejobson Hey Mike

I've been using this little directive I wrote for my application. https://gist.github.com/Liberatys/75caba5a8b5c5ef010289fe86f7fa828 maybe it helps you as well.

@mikejobson
Copy link

@Liberatys thankyou. That worked a treat!

@ghost
Copy link

ghost commented Apr 6, 2022

@mikejobson I think this should solve our problem :D #3049

@vanavaraVL
Copy link

@Liberatys , thanks! This directive helped us too!

@ghost
Copy link

ghost commented Apr 8, 2022

@vanavaraVL No worries! If nebular merges my open pr you can also use the nebular provided directive ^^ Less code for you to maintain in your project.

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

Successfully merging this pull request may close these issues.

Fix lazy loading in Tab component nb-tabset lazyLoad and (changeTab) not working
4 participants