Got some jade
with order
| Order {{ _id }}
ul.hide-until-render
each products
li(style="opacity: 0;")
| {{ name }}
Then on render I do something like as follows
Template.products.onRendered(function () {
Materialize.showStaggeredList('.hide-until-render');
});
Template.products.helpers({
order: function () {
return Orders.findOne(FlowRouter.getQueryParam('orderId'));
},
products: function () {
return Products.find({
_id: {
$in: Orders.findOne(FlowRouter.getQueryParam('orderId')).products
}
});
}
});
This works okay for when it first renders, but whenever it changes, I’d like for it to do it again. For example, if you change the query param of order
, it should change all of the products and have the new ones stagger in. Is this possible?