From f5585b3d752d699502acd4a8f66954c36776507e Mon Sep 17 00:00:00 2001 From: Douglas Lowder Date: Thu, 9 Mar 2017 04:38:21 -0800 Subject: [PATCH] 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 --- Libraries/Components/ScrollView/ScrollView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index fc5c419c71..e6a15b2b42 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -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 ( - {refreshControl} + {Platform.isTVOS ? null : refreshControl} {contentContainer} );