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

ReactNative v0.47.1 FlatList onEndReached problem. #15356

Closed
strawferry opened this issue Aug 3, 2017 · 16 comments
Closed

ReactNative v0.47.1 FlatList onEndReached problem. #15356

strawferry opened this issue Aug 3, 2017 · 16 comments
Labels
Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@strawferry
Copy link

strawferry commented Aug 3, 2017

when i update my project form 0.44.1 to 0.47.1, i found that onEndReached Function has been called repeatedly! and never stop call onEndReached.

version V 0.44.1 V 0.47.1

Environment

  1. react-native -v: 0.47.1
  2. node -v: v6.11.0
  3. npm -v: 3.10.10
  4. yarn --version: v0.27.5

Android and iOS all have this problem.

<FlatList
                    ref={(flat) => { this._flat = flat; }}
                    ItemSeparatorComponent={()=>{return <View style={{height: 4}}/>}}
                    data={this.props.data}
                    initialNumToRender={4}
                    keyExtractor={(item, index)=>{ return index}}
                    onEndReached={this._handleMore}
                    onEndReachedThreshold={0.5}
                    onRefresh={this._handleNew}
                    refreshing={false}
                    renderItem={this._renderItem}
                    style={{backgroundColor: '#EFEFF6'}}
                />
@guilhermemello
Copy link

same here

2 similar comments
@kiriyaman
Copy link

same here

@CodeRabbitYu
Copy link

same here

@saleehk
Copy link
Contributor

saleehk commented Sep 18, 2017

Any Solution yet?

@youngcao2015
Copy link

I fixed this problem by re-rendering component after componentDidMount. Here is my code:
componentDidMount() {
this.setState({});
this._makeRemoteRequest(); // network request
}

Anyone have a better solution?

@gelove
Copy link

gelove commented Sep 27, 2017

same here

@eiosca
Copy link

eiosca commented Oct 11, 2017

In my case the loop appear beacause the bottom of my list was under the screen.
you can add the props

debug=1 or debug

to get the scroll debug. On this screen i add a margin bottom to see the bottom of the scrollbar. After that, the function associated to onEndReached was call one time.

@Daley
Copy link

Daley commented Oct 26, 2017

"react-native": "0.48.2"
when wrapped a FlatList with ScrollView,and onEndReached add some data with delay.
onEndReached not stop

@HyperSimon
Copy link

@Daley Same here

@cole-yeah
Copy link

same here

@timwangdev
Copy link
Contributor

If this bug was introduced from 0.45. Most likely 3e7aa5f this commit broke it.

#16876 this issue gives me the information.

Ping @sahrens, who is the reviewer of that commit.

@timwangdev
Copy link
Contributor

#16067 may also related

@bolan9999
Copy link

Try this,please. may be it is a surprise for you

https://github.com/bolan9999/react-native-largelist

@stale
Copy link

stale bot commented Feb 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 23, 2018
@react-native-bot react-native-bot added Lists 📜 Ran Commands One of our bots successfully processed a command. labels Mar 14, 2018
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 14, 2018
@stale
Copy link

stale bot commented Jun 12, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 12, 2018
@stale
Copy link

stale bot commented Jul 12, 2018

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Jul 12, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Jul 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
No open projects
New List Views
Awaiting triage
Development

No branches or pull requests