I have one control Taband it has two tabs. I placed two Kendo Grid / Any components on different tabs.
When I open / select a tab for the first time, it displays the associated / html component in the DOM. To improve performance, I placed ngIfon tabs to show only the active html tab. So, now it Domshows only the active html tab, but now when I switch to another tab and review the previous tab, its component / content seems to be displayed again. I want to stop the second time rendering.
Note. If I replace ngIfwith hidden, it will work as accepted, but it will cost performance since it has so many hours and DOM associated with it.
In fact, my main problem is that because of the above, when I go to the tabs, my scroll position of the grid is set to the top each time, and should remain in the same state
Below is some part of the code I made.
If the condition is in the contents of the html tab (displays only the selected tab in the DOM)
<div class="tab-heading-outer">
<div class="tab-heading">
<ul id="ulOpenedTabs" class="nav nav-tabs main-tabs" role="tablist">
<li>
<span class="ellipsis"> {{tab.Header}} </span>
</li>
</ul>
</div>
</div>
<div class="tab-content" *ngIf="tab.IsSelected">
<ng-content>
</ng-content>
</div>
source
share