feat(RootLayout): add opened and closed events (#9893)

This commit is contained in:
William Juan
2022-05-14 13:58:55 +08:00
committed by Nathan Walker
parent 8987babb08
commit 7b11b6acfe

View File

@@ -77,6 +77,7 @@ export class RootLayoutBase extends GridLayout {
.play()
.then(() => {
this.applyDefaultState(view);
view.notify({ eventName: 'opened', object: view });
resolve();
})
.catch((ex) => {
@@ -101,6 +102,7 @@ export class RootLayoutBase extends GridLayout {
const popupIndex = this.getPopupIndex(view);
const poppedView = this.popupViews[popupIndex];
const cleanupAndFinish = () => {
view.notify({ eventName: 'closed', object: view });
this.removeChild(view);
resolve();
};