Performs a scroll to the bottom of the chat viewer when a new message is added. It returns a generic OnMessagesCallback that can be used with the chat viewer.
ScrollToItemOpts options for controlling the scroll behavior
A callback that performs the scroll action.
<ChatViewer messages={messages} renderMessage={renderMessage} onNewerMessages={followEveryMessage({ smooth: true })}/> Copy
<ChatViewer messages={messages} renderMessage={renderMessage} onNewerMessages={followEveryMessage({ smooth: true })}/>
Performs a scroll to the bottom of the chat viewer when a new message is added. It returns a generic OnMessagesCallback that can be used with the chat viewer.