You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not trivial to find out the index of an item anymore because the index changes when new messages are loaded in etc. How can we calculate what the index should be when we start with something like 10000?
As an idea, would it be possible to have .scrollToIndex take a callback with each item in data? That way the index wouldn't need to be known but internally virtuoso could track it. Note that this would have performance implications.
// Example: scroll to message where id is `id`virtuoso.current.scrollToIndex({index: m=>m.id===id,align: 'center',behavior: 'auto',});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It's not trivial to find out the index of an item anymore because the index changes when new messages are loaded in etc. How can we calculate what the index should be when we start with something like
10000
?As an idea, would it be possible to have
.scrollToIndex
take a callback with each item indata
? That way the index wouldn't need to be known but internally virtuoso could track it. Note that this would have performance implications.Beta Was this translation helpful? Give feedback.
All reactions