React Virtuoso Message List - ref.current.scrollToItem based on the item.data instead of using the item index? #1078
Replies: 4 comments
-
hi, sorry to ask this but |
Beta Was this translation helpful? Give feedback.
-
@vasiline2256 I see what you mean, this is a good feature enhancement. I will include the option to pass the data item to the If you need any help with the implementation of the message list, reach out to [email protected]. |
Beta Was this translation helpful? Give feedback.
-
hi, is there an option to do something after for example: does such a feature already exist? |
Beta Was this translation helpful? Give feedback.
-
@vasiline2256 Just published a new version of the MessageList component that exposes the necessary features to build the feature. Here's an example that scrolls to the replied message and highlights it using |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have a list of
Messages
and aMessage
can be a reply to anotherMessage
,and when I clicked
Goto Message
button of aReply Message
I want to scroll to the originalMessage
being replied to ( If it is already loaded withLoad More
after scrolling up )I see that there is already a function:
but this function seems to only accept the generated
index
value,is there a way to filter and get the
index
from thedata
passed to thatMessage
instead?because for me it is difficult to get the generated
index
for the Reply Message,since the
Message Items
are virtualized, I cannot usescrollIntoView()
withid
for this,or is there some other way that can accomplish this?
Beta Was this translation helpful? Give feedback.
All reactions