mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 09:35:38 -05:00
Fix view destroyed errors (#10119)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import 'vs/css!./media/propertiesContainer';
|
||||
|
||||
import { Component, Inject, forwardRef, ChangeDetectorRef, OnInit, ElementRef } from '@angular/core';
|
||||
import { Component, Inject, forwardRef, ChangeDetectorRef, OnInit, ElementRef, OnDestroy } from '@angular/core';
|
||||
import { EventType, addDisposableListener } from 'vs/base/browser/dom';
|
||||
import * as nls from 'vs/nls';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
@@ -32,7 +32,7 @@ const verticalPropertyHeight = 46;
|
||||
selector: 'properties-container',
|
||||
templateUrl: decodeURI(require.toUrl('./propertiesContainer.component.html'))
|
||||
})
|
||||
export class PropertiesContainer extends Disposable implements OnInit {
|
||||
export class PropertiesContainer extends Disposable implements OnInit, OnDestroy {
|
||||
public gridDisplayLayout = GridDisplayLayout.twoColumns;
|
||||
public propertyLayout = PropertyLayoutDirection.row;
|
||||
public loadingMessage: string = nls.localize('loadingProperties', "Loading properties");
|
||||
@@ -54,6 +54,10 @@ export class PropertiesContainer extends Disposable implements OnInit {
|
||||
this._changeRef.detectChanges();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.dispose();
|
||||
}
|
||||
|
||||
private layoutDisplayProperties(): void {
|
||||
// Reflow:
|
||||
// 2 columns w/ horizontal alignment : 1366px and above
|
||||
|
||||
Reference in New Issue
Block a user