fix configuration access for grid (#11299)

This commit is contained in:
Anthony Dresser
2020-07-10 14:51:10 -07:00
committed by GitHub
parent e714c876c2
commit 6d6abdff7d
3 changed files with 7 additions and 4 deletions

View File

@@ -47,6 +47,7 @@ import { GridPanelState, GridTableState } from 'sql/workbench/common/editor/quer
import { IUntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService';
import { SaveFormat } from 'sql/workbench/services/query/common/resultSerializer';
import { Progress } from 'vs/platform/progress/common/progress';
import { IQueryEditorConfiguration } from 'sql/platform/query/common/query';
const ROW_HEIGHT = 29;
const HEADER_HEIGHT = 26;
@@ -123,7 +124,7 @@ export class GridPanel extends Disposable {
this.reset();
}));
this.addResultSet(this.runner.batchSets.reduce<ResultSetSummary[]>((p, e) => {
if (this.configurationService.getValue<boolean>('sql.results.streaming')) {
if (this.configurationService.getValue<IQueryEditorConfiguration>('queryEditor').results.streaming) {
p = p.concat(e.resultSetSummaries);
} else {
p = p.concat(e.resultSetSummaries.filter(c => c.complete));
@@ -157,7 +158,7 @@ export class GridPanel extends Disposable {
}
};
if (this.configurationService.getValue<boolean>('sql.results.streaming')) {
if (this.configurationService.getValue<IQueryEditorConfiguration>('queryEditor').results.streaming) {
this.addResultSet(resultsToAdd);
sizeChanges();
} else {
@@ -183,7 +184,7 @@ export class GridPanel extends Disposable {
}
};
if (this.configurationService.getValue<boolean>('sql.results.streaming')) {
if (this.configurationService.getValue<IQueryEditorConfiguration>('queryEditor').results.streaming) {
for (let set of resultsToUpdate) {
let table = find(this.tables, t => t.resultSet.batchId === set.batchId && t.resultSet.id === set.id);
if (table) {