mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 05:34:15 +00:00
ScrollView should not use RefreshControl on tvOS
Summary: **Motivation**: On tvOS, Flatview and other components that use ScrollView with a RefreshControl will break without this change. **Test plan**: Manual testing on tvOS simulator. Closes https://github.com/facebook/react-native/pull/12751 Differential Revision: D4669503 fbshipit-source-id: 320036571788dc0102ec2611492d0fc97bceb53b
This commit is contained in:
parent
751addcb73
commit
f5585b3d75
@ -682,9 +682,10 @@ const ScrollView = React.createClass({
|
||||
if (refreshControl) {
|
||||
if (Platform.OS === 'ios') {
|
||||
// On iOS the RefreshControl is a child of the ScrollView.
|
||||
// tvOS lacks native support for RefreshControl, so don't include it in that case
|
||||
return (
|
||||
<ScrollViewClass {...props} ref={this._setScrollViewRef}>
|
||||
{refreshControl}
|
||||
{Platform.isTVOS ? null : refreshControl}
|
||||
{contentContainer}
|
||||
</ScrollViewClass>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user