mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 01:25:37 -05:00
Add refresh/edit columns resource viewer actions (#12161)
* Add refresh/edit columns resource viewer actions * add actions
This commit is contained in:
@@ -30,9 +30,7 @@ export class ResourceViewerInput extends EditorInput {
|
||||
|
||||
constructor(private _providerId: string, @IDataGridProviderService private _dataGridProvider: IDataGridProviderService) {
|
||||
super();
|
||||
this.fetchColumns();
|
||||
this.fetchItems();
|
||||
|
||||
this.refresh().catch(err => onUnexpectedError(err));
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
@@ -64,6 +62,13 @@ export class ResourceViewerInput extends EditorInput {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public async refresh(): Promise<void> {
|
||||
await Promise.all([
|
||||
this.fetchColumns(),
|
||||
this.fetchItems()
|
||||
]);
|
||||
}
|
||||
|
||||
private fetchColumns(): void {
|
||||
this._dataGridProvider.getDataGridColumns(this._providerId).then(columns => {
|
||||
this.columns = columns.map(col => {
|
||||
|
||||
Reference in New Issue
Block a user