Skip to content
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

[ListView] How to implement endless scroll from bottom & top? #1320

Closed
ranyefet opened this issue May 17, 2015 · 3 comments
Closed

[ListView] How to implement endless scroll from bottom & top? #1320

ranyefet opened this issue May 17, 2015 · 3 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ranyefet
Copy link

Hello all,

I'm trying to implement something similar to Sunrise

Basically I have a list which I want to:

  1. Load new items when scroll reach to end and add them to the end of the list onEndReached
  2. Load old items when scroll reach to top and add them to the beginning of the list
  3. I need to show section headers renderSectionHeader and I need to know when the current section was changed.
  4. I want to jump into specific section in the list

Is it possible to implement it with ListView? If so, do you have any tips on how to do that?

Your help is appriciated,
Ran.

@likezero
Copy link

my god, item 1 and 2 are opposite to mine..

@hongru
Copy link

hongru commented May 18, 2015

We just implement a waterfall listview.
checking whether the scrollview reached the bottom by RCTViewManager.measureLayout.
then fetch data for next section list and try to merge data to the dataSource of ScrollView.
As the dataSource changed by setState , the scrollView will be rerendered.

But in this case, the scrollview will be complete rerendered everytime when you merge data to dataSource.

I have no better idea to implement this

@brentvatne brentvatne changed the title ListView: How to implement endless scroll from bottom & top? [ListView] How to implement endless scroll from bottom & top? May 29, 2015
@brentvatne
Copy link
Collaborator

These types of how-to questions are best suited for StackOverflow - if you run into a bug in the process then please report that here! 😄

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants