We discovered an inconsistency/bug with Template.currentData
and Template.parentData
, especially when used together with custom block helpers, tracked by this issue: https://github.com/meteor/meteor/issues/3303
A related issue was that Template.currentData
did something different inside event handlers from what it did inside helpers, and was inconsistent with this
inside the handler function. In helpers, Template.currentData
returned the current data context where the helper was used, but in event handlers, Template.currentData
returned the data context of the template instead of the current element. After considering the situation, we have decided to introduce a breaking change into Blaze with the assumption that not many people were using the previous functionality.
Now, Template.currentData
works like this:
onCreated
, onRendered
, or onDestroyed
callback, returns the data context of the template.To try out this new change, run your app with meteor --release TEMPLATE-C...@0.0.1
.
Let us know how this change affects your app or package!
Thanks,
Sashko