Skip to content

Commit d330a75

Browse files
author
Nedyalko Nikolov
committed
Merge pull request NativeScript#1419 from NativeScript/nnikolov/TabViewIssue
Adding view to parent only if not already added.
2 parents 14c2e35 + f796005 commit d330a75

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/tab-view/tab-view.android.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ export class TabView extends common.TabView {
244244
}
245245

246246
item._parent = this;
247-
this._addView(item.view, idx);
247+
if (item.view.parent !== this) {
248+
this._addView(item.view, idx);
249+
}
248250
tabItems.push(this.createTabItem(item));
249251
});
250252

0 commit comments

Comments
 (0)