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