From 402604ba343da0d9e892c55401f347ab054f1b2b Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Sat, 23 Apr 2022 20:07:43 -0700 Subject: [PATCH] remove the preview feature flag check (#19194) --- .../contrib/query/browser/gridPanel.ts | 28 +++++++------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/src/sql/workbench/contrib/query/browser/gridPanel.ts b/src/sql/workbench/contrib/query/browser/gridPanel.ts index 7f4ee1fcd2..5848ffb8bc 100644 --- a/src/sql/workbench/contrib/query/browser/gridPanel.ts +++ b/src/sql/workbench/contrib/query/browser/gridPanel.ts @@ -508,7 +508,7 @@ export abstract class GridTableBase extends Disposable implements IView { this.table.setSelectionModel(this.selectionModel); this.table.registerPlugin(new MouseWheelSupport()); const autoSizeOnRender: boolean = !this.state.columnSizes && this.configurationService.getValue('resultsGrid.autoSizeColumns'); - this.table.registerPlugin(new AutoColumnSize({ autoSizeOnRender: autoSizeOnRender, maxWidth: this.configurationService.getValue('resultsGrid.maxColumnWidth'), extraColumnHeaderWidth: this.enableFilteringFeature ? FilterButtonWidth : 0 })); + this.table.registerPlugin(new AutoColumnSize({ autoSizeOnRender: autoSizeOnRender, maxWidth: this.configurationService.getValue('resultsGrid.maxColumnWidth'), extraColumnHeaderWidth: FilterButtonWidth })); this.table.registerPlugin(copyHandler); this.table.registerPlugin(this.rowNumberColumn); this.table.registerPlugin(new AdditionalKeyBindings()); @@ -534,14 +534,12 @@ export abstract class GridTableBase extends Disposable implements IView { }; this.table.rerenderGrid(); })); - if (this.enableFilteringFeature) { - this.filterPlugin = new HeaderFilter(this.contextViewService, this.notificationService, { - disabledFilterMessage: localize('resultsGrid.maxRowCountExceeded', "Max row count for filtering/sorting has been exceeded. To update it, navigate to User Settings and change the setting: 'queryEditor.results.inMemoryDataProcessingThreshold'"), - refreshColumns: !autoSizeOnRender // The auto size columns plugin refreshes the columns so we don't need to refresh twice if both plugins are on. - }); - this._register(attachTableFilterStyler(this.filterPlugin, this.themeService)); - this.table.registerPlugin(this.filterPlugin); - } + this.filterPlugin = new HeaderFilter(this.contextViewService, this.notificationService, { + disabledFilterMessage: localize('resultsGrid.maxRowCountExceeded', "Max row count for filtering/sorting has been exceeded. To update it, navigate to User Settings and change the setting: 'queryEditor.results.inMemoryDataProcessingThreshold'"), + refreshColumns: !autoSizeOnRender // The auto size columns plugin refreshes the columns so we don't need to refresh twice if both plugins are on. + }); + this._register(attachTableFilterStyler(this.filterPlugin, this.themeService)); + this.table.registerPlugin(this.filterPlugin); if (this.styles) { this.table.style(this.styles); } @@ -719,16 +717,10 @@ export abstract class GridTableBase extends Disposable implements IView { this._onDidChange.fire(undefined); } - private get enableFilteringFeature(): boolean { - return this.configurationService.getValue('workbench')['enablePreviewFeatures']; - } - private setFilterState(): void { - if (this.enableFilteringFeature) { - const rowCount = this.table.getData().getLength(); - this.filterPlugin.enabled = this.options.inMemoryDataProcessing - && (this.options.inMemoryDataCountThreshold === undefined || this.options.inMemoryDataCountThreshold >= rowCount); - } + const rowCount = this.table.getData().getLength(); + this.filterPlugin.enabled = this.options.inMemoryDataProcessing + && (this.options.inMemoryDataCountThreshold === undefined || this.options.inMemoryDataCountThreshold >= rowCount); } private generateContext(cell?: Slick.Cell): IGridActionContext {