From 610f2bf321e8e3410174cc070256d691f1347283 2014-11-21 23:20:19 From: Jason Grout Date: 2014-11-21 23:20:19 Subject: [PATCH] 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) { ... }) --- diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index 6f6cb25..d8765f0 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -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;