Add title property for data grid providers (#13155)

This commit is contained in:
Charles Gagnon
2020-10-30 15:37:11 -07:00
committed by GitHub
parent 341f7aa7ad
commit 3015845093
11 changed files with 51 additions and 40 deletions

View File

@@ -94,6 +94,8 @@ export class ResourceViewerEditor extends EditorPane {
async setInput(input: ResourceViewerInput, options: EditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise<void> {
await super.setInput(input, options, context, token);
this._resourceViewerTable.title = input.title;
this._inputDisposables.clear();
input.plugins.forEach(plugin => {

View File

@@ -52,6 +52,7 @@ export class ResourceViewerTable extends Disposable {
dataItemColumnValueExtractor: dataGridColumnValueExtractor,
forceFitColumns: true
}));
this._resourceViewerTable.setSelectionModel(new RowSelectionModel());
let filterPlugin = new HeaderFilter<azdata.DataGridItem>();
this._register(attachButtonStyler(filterPlugin, this._themeService));
@@ -100,6 +101,10 @@ export class ResourceViewerTable extends Disposable {
this._loadingSpinnerPlugin.loading = isLoading;
}
public set title(title: string) {
this._resourceViewerTable.setTableTitle(title);
}
public registerPlugin(plugin: Slick.Plugin<azdata.DataGridItem>): void {
this._resourceViewerTable.registerPlugin(plugin);
}