-
Notifications
You must be signed in to change notification settings - Fork 20
FlatList onStartReached support #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@kidroca Since you've become so familiar with the configuration of Expensify/App, would you be interested in investigating this piece? |
I see a few ways to go about it: 1
|
@kidroca would you agree this would not be the case if we make changes in the native code? I think we are going to need some, on Android and probably iOS as well. |
Yes, I don't see anything ios specific, but there's definitely generated content for android that's ignored from the repository, but part of the node module |

Summary
This pull request seeks to implement bidirectional scrolling capabilities in React Native's FlatList.
Changelog
[General][Added] - Added
onStartReachedprop in VirtualizedList.Test Plan
For now, all the testing is currently being done in the FlatList-basic example app. Furthermore, it currently has only been tested on iOS.
TODOs / Known Issues:
PAGE_SIZEof 100, themaintainVisibleContentPositionprop does not function as it should.contentOffsetis not increase to account for the newly-prepended list items, soonStartReachedis called in a loop.PAGE_SIZEof10or20.contentOffsetto account for newly-prepended list items) is right herePAGE_SIZEand the height of list items that this race condition has to do with the total height of new items being added, not the number of items being added. (i.e: the sameonStartReachedloop occurs with aPAGE_SIZE=20andITEM_HEIGHT=350, instead ofPAGE_SIZE=100andITEM_HEIGHT=72)_updateCellsToRenderand/orcomputeWindowedRenderLimitsnode_modulesfor the sake of local development. If we need to build native code from source, it becomes somewhat more complicated. In addition, I believereact-native-webusesreact-native'sVirtualizedListdirectly, so we need to ensure that when we build our fork ofreact-native-webthat we're also using our fork ofreact-native.