Refresh fix for Edit Data (#11710)

* hook in grid panel to edit data input through the editDataResultsInput

* added then at end of refreshGrid to ensure cell reset happens after refresh.

* abstraction

* Timeout removed as its causing issues with refreshing

* added await for dataRows

* Added working timeout for refresh

* removed spaces

* added comment explaining isRefresh

* Timeout set to 500 for better coverage.

Co-authored-by: Amir Omidi <amomidi@microsoft.com>
Co-authored-by: Anthony Dresser <andresse@microsoft.com>
This commit is contained in:
Alex Ma
2020-08-11 14:04:24 -07:00
committed by GitHub
parent aecb0efbc0
commit f45583c0f6
4 changed files with 40 additions and 18 deletions

View File

@@ -7,6 +7,10 @@ import { EditorInput } from 'vs/workbench/common/editor';
import { Emitter } from 'vs/base/common/event';
import { URI } from 'vs/base/common/uri';
export interface IGridPanel {
readonly onRefreshComplete: Promise<void>;
}
/**
* Input for the EditDataResultsEditor. This input helps with logic for the viewing and editing of
* data in the results grid.
@@ -25,6 +29,7 @@ export class EditDataResultsInput extends EditorInput {
public readonly onRestoreViewStateEmitter = new Emitter<void>();
public readonly onSaveViewStateEmitter = new Emitter<void>();
private _editDataGridPanel: IGridPanel;
constructor(private _uri: string) {
super();
@@ -32,6 +37,14 @@ export class EditDataResultsInput extends EditorInput {
this._hasBootstrapped = false;
}
get editDataGridPanel(): IGridPanel {
return this._editDataGridPanel;
}
set editDataGridPanel(gridPanel: IGridPanel) {
this._editDataGridPanel = gridPanel;
}
getTypeId(): string {
return EditDataResultsInput.ID;
}