You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a ScrollView is used with the stickyHeaderHiddenOnScroll prop AND a contentInset is passed in with a { top: number } value the sticky header scrolls away and hides as usual, but when scrolling up it does not reveal itself.
Steps to reproduce
Open a fresh project with the latest version of RN
Copy and paste the following code for the ScrollView
The issue has been isolated to the constructor of the `ScrollView` class in `ScrollView.js`
constructor(props: Props) {
super(props);
this._scrollAnimatedValue = new AnimatedImplementation.Value(
this.props.contentOffset?.y ?? 0,
);
this._scrollAnimatedValue.setOffset(this.props.contentInset?.top ?? 0); // Commenting this line out seems to make it work for some reason...
}
Description
When a ScrollView is used with the
stickyHeaderHiddenOnScroll
prop AND acontentInset
is passed in with a{ top: number }
value the sticky header scrolls away and hides as usual, but when scrolling up it does not reveal itself.Steps to reproduce
React Native Version
0.74.2
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/RayKay91/rn-scrollview-bug
Screenshots and Videos
Without commenting that line of code in
ScrollView.js
output.mp4
When commenting out that line of code:
output.mp4
The text was updated successfully, but these errors were encountered: