-
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
onStartReached
prop 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_SIZE
of 100, themaintainVisibleContentPosition
prop does not function as it should.contentOffset
is not increase to account for the newly-prepended list items, soonStartReached
is called in a loop.PAGE_SIZE
of10
or20
.contentOffset
to account for newly-prepended list items) is right herePAGE_SIZE
and 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 sameonStartReached
loop occurs with aPAGE_SIZE=20
andITEM_HEIGHT=350
, instead ofPAGE_SIZE=100
andITEM_HEIGHT=72
)_updateCellsToRender
and/orcomputeWindowedRenderLimits
node_modules
for the sake of local development. If we need to build native code from source, it becomes somewhat more complicated. In addition, I believereact-native-web
usesreact-native
'sVirtualizedList
directly, so we need to ensure that when we build our fork ofreact-native-web
that we're also using our fork ofreact-native
.