adjust the grid's height in table designer (#19550)

This commit is contained in:
Alan Ren
2022-05-26 17:54:23 -07:00
committed by GitHub
parent 0b6d2ea449
commit 1d276d90e0

View File

@@ -9,7 +9,8 @@ import { deepClone } from 'vs/base/common/objects';
export const TableRowHeight = 25;
export const TableHeaderRowHeight = 28;
const minHeight = getTableHeight(2);
export const ScrollbarSize = 15;
const minHeight = getTableHeight(1);
/**
* Layout the table, the height will be determined by the number of rows in it.
@@ -33,5 +34,5 @@ export function layoutDesignerTable(table: Table<Slick.SlickData>, width: number
}
function getTableHeight(rows: number): number {
return rows * TableRowHeight + TableHeaderRowHeight;
return rows * TableRowHeight + TableHeaderRowHeight + ScrollbarSize;
}