How is it possible to to scroll to the bottom of a flatlist when the data is fully loaded.
i thought it should be possible by calling
this._flatList.scrollToEnd() in the componentDidMount function. This doesn work for me.
If i use that code for a button, then it works.
Then i thought that the onLayout={() => { console.log("onLayout"); this._flatList.scrollToEnd()} } could help. but also this doesnt.
You can use with timer
componentDidMount() {
setTimeout(() => {
this._flatList.scrollToEnd();
}, 200);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With