Closed
Description
💥 Regression Report
Since the commit #e94d344 adding a { flex: 1 }
to the SectionList
's ListEmptyComponent
prop is not taken into account anymore.
The commit adds a wrapper around the ListEmptyComponent which is no longer stylable.
Last working version
Worked up to version:
0.59.2
Stopped working in version:
0.59.3
To Reproduce
Add a component like <View style={{ flex: 1 }} />
as a ListEmptyComponent, it will not take the full height.
Expected Behavior
I expect to have the RN <= 0.59.2's behavior which allowed us to add { flex: 1 }
to use the full height.
Code Example
<SectionList
sections={this.props.sections}
keyExtractor={this.keyExtractor}
renderItem={this.renderItem}
contentContainerStyle={{ flex: 1 }}
ListEmptyComponent={(
<View style={{
flex: 1, // This one won't works
backgroundColor: 'red'
}}
/>
)}
/>
Environment
React Native Environment Info:
System:
OS: macOS 10.14.4
CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
Memory: 1.15 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.12.0 - /var/folders/57/xl2kv6212pld550y_b09d18r0000gn/T/yarn--1554202709696-0.15854652797242252/node
Yarn: 1.13.0 - /var/folders/57/xl2kv6212pld550y_b09d18r0000gn/T/yarn--1554202709696-0.15854652797242252/yarn
npm: 6.7.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Xcode: 10.2/10E125 - /usr/bin/xcodebuild
npmPackages:
react: ^16.8.6 => 16.8.6
react-native: 0.59.3 => 0.59.3
Activity