mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 18:48:33 -05:00
change sizing behavior to allow the messages to fulling collapse down (set results to have no max height) (#4313)
This commit is contained in:
committed by
Karl Burtram
parent
060343f096
commit
7de294a58e
@@ -145,6 +145,7 @@ export class GridPanel extends ViewletPanel {
|
||||
@IInstantiationService private instantiationService: IInstantiationService
|
||||
) {
|
||||
super(options, keybindingService, contextMenuService, configurationService);
|
||||
this.maximumBodySize = 0;
|
||||
this.splitView = new ScrollableSplitView(this.container, { enableResizing: false, verticalScrollbarVisibility: ScrollbarVisibility.Visible });
|
||||
this.splitView.onScroll(e => {
|
||||
if (this.state && this.splitView.length !== 0) {
|
||||
@@ -195,9 +196,6 @@ export class GridPanel extends ViewletPanel {
|
||||
}
|
||||
return p;
|
||||
}, []));
|
||||
this.maximumBodySize = this.tables.reduce((p, c) => {
|
||||
return p + c.maximumSize;
|
||||
}, 0);
|
||||
|
||||
if (this.state && this.state.scrollPosition) {
|
||||
this.splitView.setScrollPosition(this.state.scrollPosition);
|
||||
@@ -216,10 +214,6 @@ export class GridPanel extends ViewletPanel {
|
||||
t.state.canBeMaximized = this.tables.length > 1;
|
||||
});
|
||||
|
||||
this.maximumBodySize = this.tables.reduce((p, c) => {
|
||||
return p + c.maximumSize;
|
||||
}, 0);
|
||||
|
||||
if (this.state && this.state.scrollPosition) {
|
||||
this.splitView.setScrollPosition(this.state.scrollPosition);
|
||||
}
|
||||
@@ -246,9 +240,6 @@ export class GridPanel extends ViewletPanel {
|
||||
}
|
||||
|
||||
const sizeChanges = () => {
|
||||
this.maximumBodySize = this.tables.reduce((p, c) => {
|
||||
return p + c.maximumSize;
|
||||
}, 0);
|
||||
|
||||
if (this.state && this.state.scrollPosition) {
|
||||
this.splitView.setScrollPosition(this.state.scrollPosition);
|
||||
@@ -275,6 +266,9 @@ export class GridPanel extends ViewletPanel {
|
||||
}
|
||||
|
||||
private addResultSet(resultSet: azdata.ResultSetSummary[]) {
|
||||
if (resultSet.length > 0) {
|
||||
this.maximumBodySize = Number.POSITIVE_INFINITY;
|
||||
}
|
||||
let tables: GridTable<any>[] = [];
|
||||
|
||||
for (let set of resultSet) {
|
||||
@@ -318,15 +312,12 @@ export class GridPanel extends ViewletPanel {
|
||||
for (let i = this.splitView.length - 1; i >= 0; i--) {
|
||||
this.splitView.removeView(i);
|
||||
}
|
||||
this.maximumBodySize = 0;
|
||||
dispose(this.tables);
|
||||
dispose(this.tableDisposable);
|
||||
this.tableDisposable = [];
|
||||
this.tables = [];
|
||||
this.maximizedGrid = undefined;
|
||||
|
||||
this.maximumBodySize = this.tables.reduce((p, c) => {
|
||||
return p + c.maximumSize;
|
||||
}, 0);
|
||||
}
|
||||
|
||||
private maximizeTable(tableid: string): void {
|
||||
|
||||
Reference in New Issue
Block a user