MCPcopy Index your code
hub / github.com/nodegui/react-nodegui / insertBefore

Method insertBefore

src/components/Tab/RNTab.ts:55–63  ·  view source on GitHub ↗
(child: RNTabItem, beforeChild: RNTabItem)

Source from the content-addressed store, hash-verified

53 this.appendInitialChild(child);
54 }
55 insertBefore(child: RNTabItem, beforeChild: RNTabItem): void {
56 if (!(child instanceof RNTabItem)) {
57 throw new Error("Children of tab should be of type TabItem");
58 }
59 const index = this.indexOf(beforeChild.actualTabWidget as QWidget<any>);
60 this.insertTab(index, child.actualTabWidget as QWidget<any>, new QIcon(), "");
61 child.parentTab = this;
62 setTabItemProps(child, this, child.initialProps, {});
63 }
64 removeChild(child: RNTabItem): void {
65 const childIndex = this.indexOf(child.actualTabWidget as QWidget<any>);
66 this.removeTab(childIndex);

Callers 1

index.tsFile · 0.45

Calls 1

setTabItemPropsFunction · 0.90

Tested by

no test coverage detected