Skip to content

Commit 637632e

Browse files
author
AntoineDoubovetzky
committed
remove wrapper around ListEmptyComponent
1 parent e5feb0c commit 637632e

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

Libraries/Lists/VirtualizedList.js

+10-11
Original file line numberDiff line numberDiff line change
@@ -873,17 +873,16 @@ class VirtualizedList extends React.PureComponent<Props, State> {
873873
<ListEmptyComponent />
874874
)): any);
875875
cells.push(
876-
<View key="$empty" style={inversionStyle}>
877-
{React.cloneElement(element, {
878-
onLayout: event => {
879-
this._onLayoutEmpty(event);
880-
if (element.props.onLayout) {
881-
element.props.onLayout(event);
882-
}
883-
},
884-
style: element.props.style,
885-
})}
886-
</View>,
876+
React.cloneElement(element, {
877+
key: '$empty',
878+
onLayout: event => {
879+
this._onLayoutEmpty(event);
880+
if (element.props.onLayout) {
881+
element.props.onLayout(event);
882+
}
883+
},
884+
style: [element.props.style, inversionStyle],
885+
}),
887886
);
888887
}
889888
if (ListFooterComponent) {

0 commit comments

Comments
 (0)