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
onScroll: (e) => {
const moveY = e.contentOffset.y;
scrollY.value = moveY;
- if (curIndexValue.value !== index) return;- shareAnimatedValue.value = moveY;
if (propOnScroll) {
runOnJS(propOnScroll as any)({ nativeEvent: e });
}
+ if (curIndexValue.value !== index) return;+ shareAnimatedValue.value = moveY;
},
});
// adjust the scene size
It seems like runOnJS(propOnScroll as any)({ nativeEvent: e }); wasn't called when the scene was not in focus. So literally we were scrolling the scene to the initial position (scrollTo from REA), but we didn't propagate this event to JS. As a result FlashList had old offset and was rendering incorrect elements.
Moving runOnJS(propOnScroll as any)({ nativeEvent: e }); before if (curIndexValue.value !== index) return; seems to resolve this problem 👀
Hey, @kirillzyusko, sorry for replying late. I'm not actively maintaining this library because I find the current implementation messy. I always think about how to make this library run perfectly and be easy to use instead of passing an index to the scene view.
Also, I have left Showtime. Next, I'm planning to create a new library and refactor it to make it more composable. And this time I will no longer use react-native-tab-view. I will let you know when it's ready.
Steps to reproduce
Actual behavior
Content is not visible.
Expected behavior
Content should be visible.
Code to reproduce
Screenshots:
repro-proof.mp4
Environment info:
The text was updated successfully, but these errors were encountered: