angular-ui/ui-grid

Expandable grid display issues when rows are expanded

Open

#4,508 建立於 2015年10月12日

在 GitHub 查看
 (16 留言) (0 反應) (1 負責人)JavaScript (5,395 star) (2,496 fork)batch import
Hi-Pri Bughelp wanted

描述

When you expand several top rows in the grid and scroll all the way down the grid is not painted properly. Just try Expandable Grid tutorial and you will see the problem. Seems like a scrolling issue but currently this feature is not much usable. You can see even bigger problem when you expand all rows. Now scrolling to the bottom exposes an empty flickering grid.

Seems like it is related to the virtualizationThreshold feature. If you make it equal to the number of rows in the main grid the issue goes away but with big datasets it is impractical as grid really slows to a crawl in that case.

The issue is in the GridRenderContainer.prototype.adjustRows method (expanded rows heights are not used for calculations) as well as in the uiGridViewport directive's controller() function:

var hiddenRowWidth = (rowContainer.currentTopRow) * rowContainer.grid.options.rowHeight;

Again, expanded row heights are not taken into consideration at all.

貢獻者指南