petyosi / react-virtuoso

The most powerful virtual list component for React
https://virtuoso.dev
MIT License
5.25k stars 301 forks source link

Using custom Scroller messes with stickyBottom behavior #773

Closed lexahall closed 2 years ago

lexahall commented 2 years ago

I'm implementing a chat feature, and I need to use a custom Scroller component. I've noticed that as soon as I implement this custom Scroller, the chat no longer stays scrolled to the bottom when new messages come in. I've made a code sandbox with a similar issue that you can see here: https://codesandbox.io/s/react-virtuoso-v1-chat-forked-nxmlsi?file=/src/App.tsx

As soon as you begin to type, the Scroller scrolls all the way back up to the start of the chat history. This is only an issue with the custom Scroller component.

petyosi commented 2 years ago

Duplicate of #756