angular-ui/ui-grid

Issues with dynamic resizing, not keeping up with parent container (white space in grid)

Open

#6,883 建立於 2018年10月31日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)JavaScript (2,496 fork)batch import
help wanted

倉庫指標

Star
 (5,395 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hi.

I am using ui-grid in a page which has a bottom panel which will open or closed based on the data in a row and when that row is clicked. This causes the grid to try and dynamically resize vertically (the window becomes vertically smaller), i've ui-grid-auto-resize applied to the grid div.

adjustedgrid

At the point above, when the grid has this white space the ui-grid-viewport is contained within the grid but the ui-grid-canvas goes off the screen.

scrolling up or down will snap the canvas back into the window. I've tried to manually force this canvas refresh with assorted functions i.e $scope.gridApi.core.refresh(); but nothing I have tried so far makes the canvas snap back. I've even tried programmatically forcing a very slight scroll.

Going to http://ui-grid.info/docs/#!/tutorial/Tutorial:%20213%20Auto-Resizing and clicking "Change to Random Size" seems to have the same fundamental problem, though after a long delay it will normally snap back.

貢獻者指南