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
react-navigation provides FlatList/SectionList/ScrollView with navigation aware behavior. To be able this working you are replacing underlying scroll component with wrapped into createNavigationAwareScrollable component. But looks like this broke some functionality, because VirtualizedList (used inside scrollable components provided by RN) are relying on calling some methods of scrollable via ref. Looks like wrapped into createNavigationAwareScrollable component doesn't proxy needed methods.
This actually broke some api's of underlying RN VirtualizedList: scrollToEnd, scrollToIndex, scrollToOffset, flashScrollIndicators, getScrollResponder , getScrollableNode , setNativeProps
Expected Behavior
FlatList/SectionList provided by react-navigation should provide all underlying functionality of RN scrollable's.
Current Behavior
react-navigation provides FlatList/SectionList/ScrollView with navigation aware behavior. To be able this working you are replacing underlying scroll component with wrapped into
createNavigationAwareScrollable
component. But looks like this broke some functionality, because VirtualizedList (used inside scrollable components provided by RN) are relying on calling some methods of scrollable via ref. Looks like wrapped intocreateNavigationAwareScrollable
component doesn't proxy needed methods.This actually broke some api's of underlying RN VirtualizedList:
scrollToEnd
,scrollToIndex
,scrollToOffset
,flashScrollIndicators
,getScrollResponder
,getScrollableNode
,setNativeProps
Expected Behavior
FlatList/SectionList provided by react-navigation should provide all underlying functionality of RN scrollable's.
How to reproduce
I've prepared a demo:
https://snack.expo.io/@ikhilko/broken-api-of-scrollables
When you click on card in FlatList, I'm calling
this.listRef.current.scrollToOffset
method and it's brokenYour Environment
If you want I can create a PR, but maybe it's need to be discussed a bit here
The text was updated successfully, but these errors were encountered: