mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 09:35:38 -05:00
no-op is the object is disposed (#20236)
This commit is contained in:
@@ -344,6 +344,7 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
|
||||
private currentHeight: number;
|
||||
private dataProvider: HybridDataProvider<T>;
|
||||
private filterPlugin: HeaderFilter<T>;
|
||||
private isDisposed: boolean = false;
|
||||
|
||||
private columns: Slick.Column<T>[];
|
||||
|
||||
@@ -420,6 +421,9 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
|
||||
}
|
||||
|
||||
public async onDidInsert() {
|
||||
if (this.isDisposed) {
|
||||
return;
|
||||
}
|
||||
if (!this.table) {
|
||||
this.build();
|
||||
}
|
||||
@@ -853,6 +857,7 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
|
||||
}
|
||||
|
||||
public override dispose() {
|
||||
this.isDisposed = true;
|
||||
this.container.remove();
|
||||
if (this.table) {
|
||||
this.table.dispose();
|
||||
|
||||
Reference in New Issue
Block a user