Reanimated 2 scrollTo function breaks sticky headers (ignores that they are there), when animation paramater is set to false.
scrollTo(ref, 0, 900, true); // respects sticky headers scrollTo(ref, 0, 900, false); // ignores sticky headers
upon using scrollTo:
Notice that the sticky header has not remained there.
Steps To Reproduce
- Press “scrollTo” to see expected behaviour
- Press the “reanimated scrollTo” button to see the actual behaviour
Sticky headers should be sticky.
Sticky headers are ignored.
Snack or minimal code example
This also happens in “^2.0.0-rc.3” without expo also, you can copy the snack code into a minimal react native project.
- React: 16.13.1
- React Native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz
- React Native Reanimated: 2.0.0-rc.0