Reactions
A common problem in messaging interfaces is how to handle reactions to messages. Displaying reactions can change the size of the message element, which can displace the rest of the messages in the list, canceling the automatic scroll behavior when new messages come in. To address this, the data.map
method has an additional autoscrollToBottomBehavior
field in the argument, which lets you specify the necessary behavior if the data mapping causes the list to be no longer at the bottom.
info
The approach above is not exclusive to reactions - the same principle should be applied to any message state change that will change the message height (for example, expanding details, etc).
loading...