From 197e1c651f315a81c2bb520eeadfc210da274b37 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Thu, 6 Sep 2018 17:00:54 -0700 Subject: [PATCH] add listeners to make grid the largest (#2447) --- src/sql/parts/query/editor/queryResultsView.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sql/parts/query/editor/queryResultsView.ts b/src/sql/parts/query/editor/queryResultsView.ts index e4e5296b92..c5dbc38d8d 100644 --- a/src/sql/parts/query/editor/queryResultsView.ts +++ b/src/sql/parts/query/editor/queryResultsView.ts @@ -18,6 +18,7 @@ import * as UUID from 'vs/base/common/uuid'; import { PanelViewlet } from 'vs/workbench/browser/parts/views/panelViewlet'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import * as DOM from 'vs/base/browser/dom'; +import { once } from 'vs/base/common/event'; class ResultsView implements IPanelView { private panelViewlet: PanelViewlet; @@ -38,6 +39,13 @@ class ResultsView implements IPanelView { { panel: this.messagePanel, size: this.messagePanel.minimumSize, index: 1 } ]); }); + let gridResizeList = this.gridPanel.onDidChange(e => { + this.panelViewlet.resizePanel(this.gridPanel, this.gridPanel.maximumSize); + }); + // once the user changes the sash we should stop trying to resize the grid + once(this.panelViewlet.onDidSashChange)(e => { + gridResizeList.dispose(); + }); } render(container: HTMLElement): void {