Skip to content

Commit

Permalink
remove wrapper around ListEmptyComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineDoubovetzky committed Apr 7, 2019
1 parent e5feb0c commit 3ec922c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,17 +873,19 @@ class VirtualizedList extends React.PureComponent<Props, State> {
<ListEmptyComponent />
)): any);
cells.push(
<View key="$empty" style={inversionStyle}>
{React.cloneElement(element, {
onLayout: event => {
this._onLayoutEmpty(event);
if (element.props.onLayout) {
element.props.onLayout(event);
}
},
style: element.props.style,
})}
</View>,
React.cloneElement(element, {
key: '$empty',
onLayout: event => {
this._onLayoutEmpty(event);
if (element.props.onLayout) {
element.props.onLayout(event);
}
},
style: StyleSheet.compose(
inversionStyle,
element.props.style,
),
}),
);
}
if (ListFooterComponent) {
Expand Down

0 comments on commit 3ec922c

Please sign in to comment.