nodegui/react-nodegui

RNList and FlexLayout

liuqi-sun opened this issue · 0 comments

appendChild(child: RNListItem): void {
if (!this.layout) {
this.setLayout(new FlexLayout());
}

if (!(child instanceof RNListItem)) {
  throw new Error("Children of list should be of type ListItem");
}

this.addItem(child);
if (child.actualListItemWidget) {
  child.setSizeHint(child.actualListItemWidget.size());
  this.setItemWidget(child, child.actualListItemWidget);
}

}

in this codes, What does new FlexLayout() do?