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

[HELP] FlatList inverted={true} should have an onTopReached callback #15820

Closed
Jose4gg opened this issue Sep 5, 2017 · 6 comments
Closed

[HELP] FlatList inverted={true} should have an onTopReached callback #15820

Jose4gg opened this issue Sep 5, 2017 · 6 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@Jose4gg
Copy link

Jose4gg commented Sep 5, 2017

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

  1. react-native -v: 0.47
  2. node -v: 6.11.1
  3. npm -v: 3.10.10

Then, specify:

  • Target Platform: IOS, ANDROID
  • Development Operating System: Mac OS Sierra
  • Build tools: Packager

Expected Behavior

If I have a FlatList with the prop inverted={true} I want the callback onEndReached to be dispached when the user reaches the top of the items.

Actual Behavior

There is no way to get a callback when the user reaches the top of an Inverted FlatList. Its should be a callback for this just like the onEndReached.

@Jose4gg Jose4gg changed the title [HELP] FlatList inverted={TRUE} should have an onTopReached callback [HELP] FlatList inverted={true} should have an onTopReached callback Sep 5, 2017
@chirag04
Copy link
Contributor

chirag04 commented Sep 5, 2017

check how this is done: https://github.com/expo/react-native-invertible-scroll-view

@hramos hramos closed this as completed Sep 5, 2017
@abrantes01
Copy link

@hramos Can we have more infos about this ? React-native-invertible-scroll-view doesn't seem to be compatible with FlatList. I also think we should have an event for top reached using inverted FlatList.

@danieljvdm
Copy link

I don't know what I'm missing here but onEndReached fires when you reach the top when the FlatList is inverted...

@quadsurf
Copy link

my issue is semi-related... i have an inverted FlatList for a texting app who's UI is identical to the iOS Messages app (an inverted list where the user pulls down to load more messages)

pull DOWN to refresh (with ActivityIndicator at the top) does not work when the FlatList is inverted, instead, it behaves like this: pull UP to refresh (with Activity Indicator at the bottom) ... literal vs intuitive: when taken "literally", i can agree that this is expected behavior since it is after all "inverted" ... however, when taken "intuitively", it's not so expected

this default is non-intuitive to users and is preventing me from being able to load more chat messages in the same manner that the iOS Messages app does it, where the user pulls DOWN to refresh and the ActivityIndicator appears at the top

does anyone know how to override this default?

@marsonmao
Copy link

So will there be a onTopReached? Or any workaround to do the same thing with FlatList? I've just searched a lot and have no clue. And I tried the onScroll event, but it is not firing for FlatList also causes out of memory.

React-Native 0.52.0
Android 8

@marsonmao
Copy link

https://github.com/expo/react-native-invertible-scroll-view could work, but it is based on ScrollView.

@facebook facebook locked as resolved and limited conversation to collaborators Sep 5, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 5, 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

8 participants