93b39b7326
Summary:When RefreshControl.refreshing change twice within 250ms, it ignores the second changing. **Test plan (required)** ``` refresh () { this.setState({ refreshing: true }) fetch('/api') .then(() => { this.setState({ refreshing: false }) }) .catch((error) => { this.setState({ refreshing: false }) }) } render() { return ( <ScrollView refreshControl={ <RefreshControl refreshing={this.state.refreshing} onRefresh={this.refresh.bind(this)} /> }> <TouchableHighlight onPress={this.refresh.bind(this)}> <View> <Text>Touch Me!</Text> </View> </TouchableHighlight> </ScrollView> ) } ``` * Test Case 1: Touch "Touch Me!", if get response less than 250ms, the state is always refreshing. * Test Case 2: Close network, Touch "Touch Me!", the state is always refreshing. Closes https://github.com/facebook/react-native/pull/6737 Differential Revision: D3189627 fb-gh-sync-id: 81c1932408e1ab99732b8340a5e3bd557629a66b fbshipit-source-id: 81c1932408e1ab99732b8340a5e3bd557629a66b |
||
---|---|---|
.. | ||
Base | ||
Executors | ||
Layout | ||
Modules | ||
Profiler | ||
React.xcodeproj | ||
Views |