chatscope / chat-ui-kit-react

Build your own chat UI with React components in few minutes. Chat UI Kit from chatscope is an open source UI toolkit for developing web chat applications.
https://chatscope.io
MIT License
1.34k stars 116 forks source link

Allow a ref to be attached to the ConversationList #83

Closed j-krl closed 1 year ago

j-krl commented 1 year ago

It would be great if I could attach a ref to the ConversationList in the same way I can to the MessageList. I'd like to be able to scroll around the ConversationList because the order of the list changes based most recent activity, and I want my currently active conversation to always be in view.

j-krl commented 1 year ago

I figured this out myself by using document.getElementById('<id>').scrollIntoView(), as calculating the scroll position from the the parent would be much more difficult. However, I could still foresee uses of having the ref on the parent for scrolling to top in certain circumstances. Not really an issue for me anymore though.