Return the viewlist from the update promise so that you can use it immediately.

The pattern is:

viewlist.update(new_list).then(function(new_view_list) {
   ...
})
This commit is contained in:
Jason Grout 2014-11-21 23:20:19 +00:00
parent 307a320284
commit 88084db35d

View File

@ -648,6 +648,7 @@ define(["widgets/js/manager",
that._models = new_models.slice();
return Promise.all(added_views, function(added) {
that.views = that.views.slice(0,first_removed).concat(added);
return that.views;
});
});
return this.state_change;