Backbone.Marionette Odwołanie CollectionView, gdy wszystkie itemViews zakończyły renderowanie?

Używam marionetkiLayout .show renderować aCollectionView i zastanawiałem się, czy istnieje sposób na wykrycie kiedywszystko ItemView dzieci skończyły renderować?

Uproszczona wersja mojego kodu to:

Układ

Layouts.Group = Backbone.Marionette.Layout.extend({

    template: Templates.group,

    ...

    regions: {
        header: ".group-header"
        details: ".group-details"
    },

    ...

});

KolekcjaView

Views.GroupDetail = Backbone.Marionette.CollectionView.extend({

    itemView: groupDetailRow,

    ...

    onRender: function () {

        // do something here after rendering *all* groupDetailRows of information for group detail section

    }

});

ItemView

Views.GroupDetailRow = Backbone.Marionette.ItemView.extend({

    onRender: function () {

        // single groupDetailRow of information

    }

});

.pokazać

var details = new Views.GroupDetail();

details.show(new DV.Time.Views.GroupDetail());

Zauważyłem w dokumentach, że jest wzmianka o.done funkcjonować:

new MyCollectionView().render().done(function(){
  // all of the children are now rendered. do stuff here.
});

Czy możliwe jest użycie tego zLayout?

questionAnswers(1)

yourAnswerToTheQuestion