Closed fizerkhan closed 10 years ago
In Backbone v1.0.0+, for the reset event to fire on your collection post-fetch, pass reset: true
.
See the updated docs: http://backbonejs.org/#Collection-fetch
@existentialism marionette should handle this right?
@fizerkhan sorry for late reply, somehow fell through the cracks... but I don't think this is Marionette's responsibility.
Aren't you calling your own @collection.fetch()
?
@existentialism Thanks for the reply. Why onCompositeCollectionRendered does not work?. Marionette docs says it will be invoked if all items in collection has been rendered. But it does not called with backbone 1.0
It does not because it is bound to the collection reset event wich isn't fired if you don't pass reset: true
as argument when you call fetch()
. You should listen to the collection event sync if you wanna know when an update without a reset has been called.
@ingro Thanks, It works now. But migration from backbone 0.9.9 to backbone 1.0 needs this changed in all collection fetch. It will be nice if it is added in the documentation.
Fixed by #576.
I have listened for an collection events in my View by
It works well with backbone 0.9.9, but not with backbone 1.0.
Moreover, in CompositeView, onCompositeCollectionRendered does not called after rendered the collection