mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(RootLayout): add opened and closed events (#9893)
This commit is contained in:
committed by
Nathan Walker
parent
8987babb08
commit
7b11b6acfe
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user