Skip to content

Commit

Permalink
Merge pull request jupyter-widgets#3618 from jasongrout/updateoptions
Browse files Browse the repository at this point in the history
Pass change options into update calls
  • Loading branch information
jasongrout authored Jan 28, 2023
2 parents 4021572 + 3c2daa2 commit e5420b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/base/src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -737,13 +737,13 @@ export class WidgetView extends NativeView<WidgetModel> {
* Initializer, called at the end of the constructor.
*/
initialize(parameters: WidgetView.IInitializeParameters): void {
this.listenTo(this.model, 'change', () => {
this.listenTo(this.model, 'change', (model, options) => {
const changed = Object.keys(this.model.changedAttributes() || {});
if (changed[0] === '_view_count' && changed.length === 1) {
// Just the view count was updated
return;
}
this.update();
this.update(options);
});

this.options = parameters.options;
Expand Down

0 comments on commit e5420b8

Please sign in to comment.