a couple more fixes for table filter (#15121)

* a few fixes

* add comments and fix for non-ideal scenario
This commit is contained in:
Alan Ren
2021-04-14 10:20:29 -07:00
committed by GitHub
parent 5922047f6b
commit 842a33e318
9 changed files with 131 additions and 106 deletions

View File

@@ -6,7 +6,7 @@
import 'vs/css!./media/resourceViewerTable';
import * as azdata from 'azdata';
import { Table } from 'sql/base/browser/ui/table/table';
import { attachTableStyler } from 'sql/platform/theme/common/styler';
import { attachTableFilterStyler, attachTableStyler } from 'sql/platform/theme/common/styler';
import { RowSelectionModel } from 'sql/base/browser/ui/table/plugins/rowSelectionModel.plugin';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
@@ -24,7 +24,6 @@ import { ColumnDefinition } from 'sql/workbench/browser/editor/resourceViewer/re
import { Emitter } from 'vs/base/common/event';
import { ContextMenuAnchor } from 'sql/workbench/contrib/resourceViewer/browser/resourceViewerEditor';
import { LoadingSpinnerPlugin } from 'sql/base/browser/ui/table/plugins/loadingSpinner.plugin';
import { attachButtonStyler } from 'vs/platform/theme/common/styler';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
export class ResourceViewerTable extends Disposable {
@@ -57,7 +56,7 @@ export class ResourceViewerTable extends Disposable {
this._resourceViewerTable.setSelectionModel(new RowSelectionModel());
let filterPlugin = new HeaderFilter<azdata.DataGridItem>(this._contextViewService);
this._register(attachButtonStyler(filterPlugin, this._themeService));
this._register(attachTableFilterStyler(filterPlugin, this._themeService));
this._register(attachTableStyler(this._resourceViewerTable, this._themeService));
this._register(this._resourceViewerTable.onClick(this.onTableClick, this));
this._register(this._resourceViewerTable.onContextMenu((e: ITableMouseEvent) => {