Skip to content

Commit feefd7d

Browse files
tabs: uncommenting the insertChild method (#176)
1 parent c3fda26 commit feefd7d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/components/Tab/RNTab.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,10 @@ export class RNTab extends QTabWidget implements RNComponent {
5656
if (!(child instanceof RNTabItem)) {
5757
throw new Error("Children of tab should be of type TabItem");
5858
}
59-
// uncomment below code after new release of nodegui containing insertTab
60-
// const index = this.indexOf(beforeChild.actualTabWidget as NodeWidget<any>);
61-
// this.insertTab(index, child.actualTabWidget, new QIcon(), "");
62-
// child.parentTab = this;
63-
// setTabItemProps(child, this, child.initialProps, {});
59+
const index = this.indexOf(beforeChild.actualTabWidget as NodeWidget<any>);
60+
this.insertTab(index, child.actualTabWidget as NodeWidget<any>, new QIcon(), "");
61+
child.parentTab = this;
62+
setTabItemProps(child, this, child.initialProps, {});
6463
}
6564
removeChild(child: RNTabItem): void {
6665
const childIndex = this.indexOf(child.actualTabWidget as NodeWidget<any>);

0 commit comments

Comments
 (0)