mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 17:23:29 -05:00
fix insert ordering in scrollable splitview (#2392)
This commit is contained in:
@@ -158,6 +158,8 @@ export class GridPanel extends ViewletPanel {
|
||||
tables.push(table);
|
||||
}
|
||||
|
||||
// possible to need a sort?
|
||||
|
||||
if (isUndefinedOrNull(this.maximizedGrid)) {
|
||||
this.splitView.addViews(tables, tables.map(i => i.minimumSize), this.splitView.length);
|
||||
}
|
||||
@@ -207,6 +209,8 @@ export class GridPanel extends ViewletPanel {
|
||||
class GridTable<T> extends Disposable implements IView {
|
||||
private static BOTTOMPADDING = 5;
|
||||
private static ACTIONBAR_WIDTH = 26;
|
||||
// this is the min height for grids
|
||||
private static MIN_GRID_HEIGHT = (minGridHeightInRows * rowHeight) + columnHeight + estimatedScrollBarHeight + GridTable.BOTTOMPADDING;
|
||||
private table: Table<T>;
|
||||
private actionBar: ActionBar;
|
||||
private container = document.createElement('div');
|
||||
@@ -322,9 +326,9 @@ class GridTable<T> extends Disposable implements IView {
|
||||
}
|
||||
|
||||
public get minimumSize(): number {
|
||||
// this handles if the row count is small, like 4-5 rows
|
||||
let smallestRows = ((this.resultSet.rowCount) * rowHeight) + columnHeight + estimatedScrollBarHeight + GridTable.BOTTOMPADDING;
|
||||
let smallestSize = (minGridHeightInRows * rowHeight) + columnHeight + estimatedScrollBarHeight + GridTable.BOTTOMPADDING;
|
||||
return Math.min(smallestRows, smallestSize);
|
||||
return Math.min(smallestRows, GridTable.MIN_GRID_HEIGHT);
|
||||
}
|
||||
|
||||
public get maximumSize(): number {
|
||||
|
||||
Reference in New Issue
Block a user