GetStream / stream-chat-react

React Chat SDK ➜ Stream Chat 💬
https://getstream.io/chat/sdk/react/
Other
702 stars 273 forks source link

question: adding a reaction isn't visible until scrolled #2127

Closed stephenarra closed 1 year ago

stephenarra commented 1 year ago

Describe the bug

Using the VirtualizedMessageList component, it doesn't autoscroll to bottom when the first reaction is added.

To Reproduce

Steps to reproduce the behavior:

  1. Go to a demo using VirtualizedMessageList (eg. https://getstream.io/chat/demos/livestream/)
  2. Add a reaction to the last message
  3. Reaction is not visible on screen

Expected behavior

The entire message to be visible - it works as expected in the MessageList.

Screenshots

Kapture 2023-10-13 at 11 53 16

Package version

Desktop (please complete the following information):

Additional context

I looked into using the autoscrollToBottom function in the message context, but it seemed to have no effect.

MartinCupela commented 1 year ago

Hello @stephenarra, you can control this behavior by decreasing the threshold, where the list is still considered to be scrolled to the bottom. An example could be:

 <VirtualizedMessageList additionalVirtuosoProps={{atBottomThreshold:30}}/>