mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
fix(all): component reusage (#18963)
Use new stencil APIs to allow ionic elements to be reused once removed from the DOM. fixes #18843 fixes #17344 fixes #16453 fixes #15879 fixes #15788 fixes #15484 fixes #17890 fixes #16364
This commit is contained in:
@ -136,7 +136,7 @@ export class Menu implements ComponentInterface, MenuI {
|
||||
*/
|
||||
@Event() protected ionMenuChange!: EventEmitter<MenuChangeEventDetail>;
|
||||
|
||||
async componentWillLoad() {
|
||||
async connectedCallback() {
|
||||
if (this.type === undefined) {
|
||||
this.type = config.get('menuType', this.mode === 'ios' ? 'reveal' : 'overlay');
|
||||
}
|
||||
@ -182,11 +182,12 @@ export class Menu implements ComponentInterface, MenuI {
|
||||
this.updateState();
|
||||
}
|
||||
|
||||
componentDidLoad() {
|
||||
async componentDidLoad() {
|
||||
this.ionMenuChange.emit({ disabled: this.disabled, open: this._isOpen });
|
||||
this.updateState();
|
||||
}
|
||||
|
||||
componentDidUnload() {
|
||||
disconnectedCallback() {
|
||||
this.blocker.destroy();
|
||||
menuController._unregister(this);
|
||||
if (this.animation) {
|
||||
|
Reference in New Issue
Block a user