8000 fix(tabs-ios): unable to return to tab after tab with nested frame vi… · NativeScript/NativeScript@9638f37 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 9638f37

Browse files
committed
fix(tabs-ios): unable to return to tab after tab with nested frame visited
1 parent 4511c76 commit 9638f37

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tns-core-modules/ui/tabs/tabs.ios.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ class UIPageViewControllerDataSourceImpl extends NSObject implements UIPageViewC
270270
// }
271271

272272
(<TabContentItem>prevItem).canBeLoaded = true;
273+
owner._loadUnloadTabItems(selectedIndex);
273274

274275
return prevViewController;
275276
}
@@ -296,6 +297,7 @@ class UIPageViewControllerDataSourceImpl extends NSObject implements UIPageViewC
296297
// }
297298

298299
(<TabContentItem>nextItem).canBeLoaded = true;
300+
owner._loadUnloadTabItems(selectedIndex);
299301
// nextItem.loadView(nextItem.view);
300302

301303
return nextViewController;
@@ -675,7 +677,6 @@ export class Tabs extends TabsBase {
675677
toLoad.forEach(index => {
676678
const item = items[index];
677679
if (this.isLoaded && items[index]) {
678-
(<any>item).canBeLoaded = true;
679680
item.loadView(item.view);
680681
}
681682
});
@@ -1033,7 +1034,6 @@ export class Tabs extends TabsBase {
10331034
// if (traceEnabled()) {
10341035
// traceWrite("TabView._onSelectedIndexPropertyChangedSetNativeValue(" + value + ")", traceCategories.Debug);
10351036
// }
1036-
const that = this;
10371037

10381038
if (value > -1) {
10391039
const item = this.items[value];
@@ -1056,7 +1056,9 @@ export class Tabs extends TabsBase {
10561056
this._currentNativeSelectedIndex = value;
10571057
this.viewController.setViewControllersDirectionAnimatedCompletion(controllers, navigationDirection, true, (finished: boolean) => {
10581058
if (finished) {
1059-
that._canSelectItem = true;
1059+
this._canSelectItem = true;
1060+
item.canBeLoaded = true;
1061+
this._loadUnloadTabItems(value);
10601062
}
10611063
});
10621064

0 commit comments

Comments
 (0)
0