Disable subview clipping when sticky headers are enabled
Summary: Subview clipping still causes issues on Android and would be pretty hard to fix properly, I investigated this a bit and sticky header views are getting removed because it doesn't take transform into consideration. It would also require to recalculate subview clipping on every transform change so I think it is better to just disable subview clipping in when there are sticky headers, especially since we seem to be moving away from subview clipping with things like FlatList. **Test plan** Tested that sticky headers work in ListView paging example. Fixes #14000 Closes https://github.com/facebook/react-native/pull/14010 Differential Revision: D5283723 Pulled By: sahrens fbshipit-source-id: 183b3202765ae09aaae05497694c3f514e969ea1
This commit is contained in:
parent
75508c12ff
commit
407ec0023f
|
@ -676,7 +676,13 @@ const ScrollView = React.createClass({
|
||||||
{...contentSizeChangeProps}
|
{...contentSizeChangeProps}
|
||||||
ref={this._setInnerViewRef}
|
ref={this._setInnerViewRef}
|
||||||
style={contentContainerStyle}
|
style={contentContainerStyle}
|
||||||
removeClippedSubviews={this.props.removeClippedSubviews}
|
removeClippedSubviews={
|
||||||
|
// Subview clipping causes issues with sticky headers on Android and
|
||||||
|
// would be hard to fix properly in a performant way.
|
||||||
|
Platform.OS === 'android' && hasStickyHeaders ?
|
||||||
|
false :
|
||||||
|
this.props.removeClippedSubviews
|
||||||
|
}
|
||||||
collapsable={false}>
|
collapsable={false}>
|
||||||
{children}
|
{children}
|
||||||
</ScrollContentContainerViewClass>;
|
</ScrollContentContainerViewClass>;
|
||||||
|
|
Loading…
Reference in New Issue