From 6d48faa96af211665bbc1a06cf4e1ac3b26bc865 2014-09-13 20:27:52 From: sylvain.corlay Date: 2014-09-13 20:27:52 Subject: [PATCH] Added on_bulk_change method in WidgetModel --- diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index 8dcda6d..730c319 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -264,6 +264,14 @@ define(["widgets/js/manager", } }, + on_bulk_change: function(keys, callback, context) { + this.on('change', function() { + if (keys.some(this.hasChanged, this)) { + callback.apply(context); + } + }, this); + + }, }); widgetmanager.WidgetManager.register_widget_model('WidgetModel', WidgetModel);