Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/js/core/rendering/renderers/VirtualDomVertical.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,27 +310,29 @@ export default class VirtualDomVertical extends Renderer{
}

element.appendChild(rowFragment);
// NOTE: The next 3 loops are separate on purpose
// This is to batch up the dom writes and reads which drastically improves performance

// NOTE: The next 4 loops are separate on purpose
// This is to batch up the dom writes and reads which drastically improves performance

renderedRows.forEach((row) => {
row.rendered();
});

const rowsNeedingHeightInit = [];
renderedRows.forEach((row) => {
if(!row.heightInitialized) {
row.calcHeight(true);
rowsNeedingHeightInit.push(row);
}
});

renderedRows.forEach((row) => {
if(!row.heightInitialized) {
row.setCellHeight();
}
rowsNeedingHeightInit.forEach((row) => {
row.setCellHeight();
});

renderedRows.forEach((row) => {
rowHeight = row.getHeight();

if(totalRowsRendered < topPad){
topPadHeight += rowHeight;
}else {
Expand Down