There is no easy way to get notified when the Spacebars {{#each}} block rendered in the DOM, every element that has been renamed.
The best solution is to use another reactive computation ( Tracker.autorun ) to monitor your (reactive) current data.
Each time your current data (probably the cursor) changes, you can run arbitrary code after performing all other reactive calculations that perform any of your work using Tracker.afterFlush .
The {{#each}} block is one of those calculations whose role is to listen to the source of reactive data that you pass to it as an argument, and repeat it Template.contentBlock as many times as there are elements extracted from the original iteration using the current element as the current data context.
Listening to the same reactive data source as the auxiliary block {{#each}} , and running your code AFTER completing its own reactive calculation, you can get the actual requested behavior without relying on some weird tricks.
Here is the full implementation of this template:
Js
Template.content.helpers({ currentData: function(){ return Template.currentData(); } }); Template.content.onRendered(function(){ this.autorun(function(){ var cursor = Template.currentData();
source share