With the each plugin, the dynamic views that are created have the same lifecycle handlers as the parent view because we're just re-using that parent constructor.
eg. You create a View and add a created handler. Then you use the each plugin and for each view that is created for the items, that created handler will be fired.
It needs to be changed to something like:
function ChildView(){
View.apply(this, arguments);
}
ChildView.prototype = Object.create(View.prototype);
But then it missed out on parse - but that should probably be on the prototype.
Or just create a new ripple view. This creates a cyclical dependency which is pretty hard for standalone builds.
With the
each
plugin, the dynamic views that are created have the same lifecycle handlers as the parent view because we're just re-using that parent constructor.eg. You create a
View
and add acreated
handler. Then you use theeach
plugin and for each view that is created for the items, thatcreated
handler will be fired.It needs to be changed to something like:
But then it missed out on
parse
- but that should probably be on the prototype.Or just create a new
ripple
view. This creates a cyclical dependency which is pretty hard for standalone builds.