Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNList and FlexLayout #369

Open
liuqi-sun opened this issue Feb 9, 2022 · 0 comments
Open

RNList and FlexLayout #369

liuqi-sun opened this issue Feb 9, 2022 · 0 comments

Comments

@liuqi-sun
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant