Scroll Animation when New Item Added to DOM

Currently, I’m rendering a list of items where I’m scrolling to the bottom in an onRendered function. However, I’m having trouble figuring out how to scroll when new items are added. Any ideas?

You could possibly store the number of nodes in a variable or session variable inside a run function. Declare another variable or session variable counting the number of nodes.

If the new variable or session variable is greater than the previous variable execute the scroll function.

You could use the cursor’s observe api documented here

With that, you can listen as new documents are added to the client. When a new one comes, you could scroll to somewhere in the dom… perhaps render the template with a tag containing the documents id as an attribute so you can find it via jquery.