scrollEventThrottle has no effect on SectionList
See original GitHub issuescrollEventThrottle
doesn’t seem to make any difference when applied to SectionList
. It works as expected with ScrollView
.
Environment
Environment: OS: macOS High Sierra 10.13.3 Node: 8.9.4 Yarn: 1.2.1 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed) react: ^16.3.0-alpha.1 => 16.3.0-alpha.2 react-native: 0.54.2 => 0.54.2
Steps to Reproduce
export default class App extends Component<Props> {
render() {
return (
<View style={styles.container}>
<ScrollView
scrollEventThrottle={ 1000 }
onScroll={ e => console.log( Date.now() ) }
>
<Text>ScrollView Text</Text>
</ScrollView>
<SectionList
renderItem={ ( { item } ) => <Text>SectionList Text</Text> }
sections={ [ {
title: 'section title',
data: [ 'item' ]
} ] }
scrollEventThrottle={ 1000 }
onScroll={ e => console.log( Date.now() ) }
/>
</View>
);
}
}
Expected Behavior
The events logged to the console should have at least 1000ms between them.
Actual Behavior
SectionList logs events at high rates regardless of the value passed to scrollEventThrottle
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Get current scroll position of ScrollView in React Native
Fires while the user is dragging or while the scroll view is gliding, at some frequency determined by scrollEventThrottle and at most once ......
Read more >Common bugs in React Native ScrollView and how to fix them
React Native's ScrollView component is ubiquitous, but its implementation can sometimes lead to mistakes. Learn what to look out for here.
Read more >ScrollView // React Native for Web - GitHub Pages
ScrollView must have a bounded height: either set the height of the view ... is larger than the scroll view, this property has...
Read more >ScrollView - React Native
FlatList renders items lazily, when they are about to appear, and removes items that scroll way off screen to save memory and processing...
Read more >ScrollRef - You.i TV Developer Portal
These props only work with You.i React Native and the After Effects workflow. ... Similar to scrollEventThrottle prop of Facebook React Native ScrollView ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This has effect even in
<ScrollView>
: https://snack.expo.io/rkgPA5FkHClosing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.