ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Using rowHeight : "uiGridAutoResize" to autoresize row height hides all but 4 rows of data.

Open frankbarbarino opened this issue 11 years ago • 3 comments

My UI needs to autosize the height of the row to fit the length of the cell data. This seemed easily accomplished by setting $scope.gridOptions1 = {rowHeight: "uiGridAutoResize"};

When this option is added, the viewable set of rows shrinks to 4. The css for the table is height/width 100%, so there shouldn't be a reason for the grid to shrink the viewport, but it seems to behaving that way. You can see this in action here in a plunk: http://plnkr.co/edit/eprxaFhoDLvFd4oZp7In Remove the rowHeight line from the options and all rows are displayed. Restore the line and it shrinks to 4 rows.

frankbarbarino avatar Mar 27 '15 19:03 frankbarbarino

I don't think uiGridAutoResize, particularly when passed as a string, is a valid grid option for rowHeight. The rowHeight option is documented as only taking a height in pixels. The grid pretty explicitly doesn't support variable rowHeights, it doesn't work well with row virtualisation.

PaulL1 avatar Mar 27 '15 20:03 PaulL1

Hi @PaulL1 , @frankbarbarino , Is this the correct approach to set the uiGridAutoResize property. As per the documentation we need to set it as a attribute of ui-grid directive. as stated in the ui-grid tutorial http://ui-grid.info/docs/#/tutorial/213_auto_resizing

AdityaJitu avatar Mar 30 '15 14:03 AdityaJitu

Closing - no comments for some time and solution has been provided.

PaulL1 avatar Apr 21 '15 08:04 PaulL1