It is not possible to use scrollToEnd for FlatList after adding of new item. #22854
Closed
3 tasks done
Labels
Component: FlatList
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
Description
I need to scroll to the end of FlatList after adding of new list item (like a chat).
So I change state with new message and then use:
this.setState({messages});
this.messagesList.scrollToEnd({animated: true});
It woks only if I add some 'magic' setTimeout (200ms).
It there any way to detect that new message is added and i can call scrollToEnd?
The text was updated successfully, but these errors were encountered: