From 88084db35d676b896004f1e22f26b711f62fc981 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Fri, 21 Nov 2014 23:20:19 +0000 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) { ... }) --- IPython/html/static/widgets/js/widget.js | 1 + 1 file changed, 1 insertion(+) diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index 6f6cb257b..d8765f023 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;