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()
|
.play()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.applyDefaultState(view);
|
this.applyDefaultState(view);
|
||||||
|
view.notify({ eventName: 'opened', object: view });
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
.catch((ex) => {
|
.catch((ex) => {
|
||||||
@@ -101,6 +102,7 @@ export class RootLayoutBase extends GridLayout {
|
|||||||
const popupIndex = this.getPopupIndex(view);
|
const popupIndex = this.getPopupIndex(view);
|
||||||
const poppedView = this.popupViews[popupIndex];
|
const poppedView = this.popupViews[popupIndex];
|
||||||
const cleanupAndFinish = () => {
|
const cleanupAndFinish = () => {
|
||||||
|
view.notify({ eventName: 'closed', object: view });
|
||||||
this.removeChild(view);
|
this.removeChild(view);
|
||||||
resolve();
|
resolve();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user