Call ModelView base init after view init (#13261)

* Call ModelView base init after view init

* baseInit to end
This commit is contained in:
Charles Gagnon
2020-11-07 09:41:49 -08:00
committed by GitHub
parent 5e00dcb78c
commit 8b73391845
33 changed files with 43 additions and 116 deletions

View File

@@ -5,7 +5,7 @@
import 'vs/css!./media/flexContainer';
import {
ChangeDetectorRef, ViewChildren, ElementRef, OnDestroy, OnInit, QueryList
ChangeDetectorRef, ViewChildren, ElementRef, OnDestroy, QueryList, AfterViewInit
} from '@angular/core';
import * as types from 'vs/base/common/types';
@@ -27,7 +27,7 @@ export class ItemDescriptor<T> {
constructor(public descriptor: IComponentDescriptor, public config: T) { }
}
export abstract class ComponentBase<TPropertyBag extends azdata.ComponentProperties> extends Disposable implements IComponent, OnDestroy, OnInit {
export abstract class ComponentBase<TPropertyBag extends azdata.ComponentProperties> extends Disposable implements IComponent, OnDestroy, AfterViewInit {
protected properties: { [key: string]: any; } = {};
private _valid: boolean = true;
protected _validations: (() => boolean | Thenable<boolean>)[] = [];
@@ -58,7 +58,7 @@ export abstract class ComponentBase<TPropertyBag extends azdata.ComponentPropert
}
}
abstract ngOnInit(): void;
abstract ngAfterViewInit(): void;
protected baseDestroy(): void {
if (this.modelStore) {