@@ -270,6 +270,7 @@ class UIPageViewControllerDataSourceImpl extends NSObject implements UIPageViewC
270
270
// }
271
271
272
272
( < TabContentItem > prevItem ) . canBeLoaded = true ;
273
+ owner . _loadUnloadTabItems ( selectedIndex ) ;
273
274
274
275
return prevViewController ;
275
276
}
@@ -296,6 +297,7 @@ class UIPageViewControllerDataSourceImpl extends NSObject implements UIPageViewC
296
297
// }
297
298
298
299
( < TabContentItem > nextItem ) . canBeLoaded = true ;
300
+ owner . _loadUnloadTabItems ( selectedIndex ) ;
299
301
// nextItem.loadView(nextItem.view);
300
302
301
303
return nextViewController ;
@@ -675,7 +677,6 @@ export class Tabs extends TabsBase {
675
677
toLoad . forEach ( index => {
676
678
const item = items [ index ] ;
677
679
if ( this . isLoaded && items [ index ] ) {
678
- ( < any > item ) . canBeLoaded = true ;
679
680
item . loadView ( item . view ) ;
680
681
}
681
682
} ) ;
@@ -1033,7 +1034,6 @@ export class Tabs extends TabsBase {
1033
1034
// if (traceEnabled()) {
1034
1035
// traceWrite("TabView._onSelectedIndexPropertyChangedSetNativeValue(" + value + ")", traceCategories.Debug);
1035
1036
// }
1036
- const that = this ;
1037
1037
1038
1038
if ( value > - 1 ) {
1039
1039
const item = this . items [ value ] ;
@@ -1056,7 +1056,9 @@ export class Tabs extends TabsBase {
1056
1056
this . _currentNativeSelectedIndex = value ;
1057
1057
this . viewController . setViewControllersDirectionAnimatedCompletion ( controllers , navigationDirection , true , ( finished : boolean ) => {
1058
1058
if ( finished ) {
1059
- that . _canSelectItem = true ;
1059
+ this . _canSelectItem = true ;
1060
+ item . canBeLoaded = true ;
1061
+ this . _loadUnloadTabItems ( value ) ;
1060
1062
}
1061
1063
} ) ;
1062
1064
0 commit comments