MOBILE-3320 tabs: Improve number of tabs calculation

main
Dani Palou 2021-06-02 13:49:14 +02:00
parent bf31840d56
commit d74c87d554
2 changed files with 7 additions and 3 deletions

View File

@ -378,9 +378,14 @@ export class CoreTabsBaseComponent<T extends CoreTabBase> implements OnInit, Aft
}
this.maxSlides = 3;
const width = this.slidesSwiper.width;
let width = this.slidesSwiper.width;
if (!width) {
return;
this.slidesSwiper.updateSize();
width = this.slidesSwiper.width;
if (!width) {
return;
}
}
const zoomLevel = await CoreSettingsHelper.getZoom();

View File

@ -11,7 +11,6 @@
<ng-container *ngFor="let tab of tabs">
<ion-slide
role="presentation"
[hidden]="!hideUntil"
[id]="tab.id! + '-tab'"
class="tab-slide"
tabindex="-1"