Skip to content

Commit 3ec922c

Browse files
author
AntoineDoubovetzky
committed
remove wrapper around ListEmptyComponent
1 parent e5feb0c commit 3ec922c

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

Libraries/Lists/VirtualizedList.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -873,17 +873,19 @@ 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: StyleSheet.compose(
885+
inversionStyle,
886+
element.props.style,
887+
),
888+
}),
887889
);
888890
}
889891
if (ListFooterComponent) {

0 commit comments

Comments
 (0)