angular-ui/ui-grid

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

Open

#6883 aperta il 31 ott 2018

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)JavaScript (2496 fork)batch import
help wanted

Metriche repository

Star
 (5395 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor