Skip to content

Commit

Permalink
Merge pull request #3300 from martinRenou/add_events
Browse files Browse the repository at this point in the history
Add layout, style and shown events
  • Loading branch information
jasongrout authored Oct 19, 2021
2 parents 441135a + d1cd3ea commit 087b209
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/base/src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ export class DOMWidgetView extends WidgetView {
this.luminoWidget,
Widget.ResizeMessage.UnknownSize
);
this.trigger('layout-changed');
return view;
});
})
Expand All @@ -961,6 +962,7 @@ export class DOMWidgetView extends WidgetView {
// Trigger the displayed event of the child view.
return this.displayed.then(() => {
view.trigger('displayed');
this.trigger('style-changed');
// Unlike for the layout attribute, style changes don't
// trigger Lumino resize messages.
return view;
Expand Down Expand Up @@ -1083,6 +1085,9 @@ export class DOMWidgetView extends WidgetView {
case 'after-attach':
this.trigger('displayed');
break;
case 'show':
this.trigger('shown');
break;
}
}

Expand Down

0 comments on commit 087b209

Please sign in to comment.