Disable tab lazy load

Hello,

By default tabs seem to lazy loading. So when they are not selected at least once they are not in the DOM.
*edit: seems like only one tab is ever in the DOM.
I'm trying to load all tabs on init. So the tabs are in the DOM but hidden.

It looks like this should be possible by using the [loadOn] property:
TabModel API in Angular Tabs API component - Syncfusion
However, I cannot figure out how to get this to work.

Is there an example available?


Kind regards,

Jaap


1 Reply 1 reply marked as answer

RV Ravikumar Venkatesan Syncfusion Team January 15, 2024 07:29 PM UTC

Hi Jaap,


To render all the Tab item's contents at the initial rendering you must render the Tab component as HTML elements as demonstrated in the below UG link. Try the shared solution and let us know if you need further assistance.


Sample: https://stackblitz.com/edit/ej2-angular-tab-render-as-html-elements?file=src%2Fapp.component.html

UG: https://ej2.syncfusion.com/angular/documentation/tab/getting-started#initialize-the-tab-using-html-elements


Regards,

Ravikumar Venkatesan


Marked as answer
Loader.
Up arrow icon