Fixed bug: Notebooks Vertical Scrollbar is Unnecessary for Some Grid Outputs (#5847)

This commit is contained in:
Gene Lee
2019-06-03 16:47:07 -07:00
committed by GitHub
parent 8d70544374
commit 9f7d96bad3

View File

@@ -67,7 +67,7 @@ export function renderDataResource(
detailTable.registerPlugin(new AdditionalKeyBindings());
let numRows = detailTable.grid.getDataLength();
// Need to include column headers and scrollbar, so that's why 1 needs to be added
let rowsHeight = (numRows + 1) * RESULTS_GRID_DEFAULTS.rowHeight + BOTTOM_PADDING_AND_SCROLLBAR;
let rowsHeight = (numRows + 1) * RESULTS_GRID_DEFAULTS.rowHeight + BOTTOM_PADDING_AND_SCROLLBAR + numRows;
// if no rows are in the grid, set height to 100% of the container's height
if (numRows === 0) {
tableContainer.style.height = '100%';