ngGrid- version 2.x - Horizontal scrollbar appears even if column widths fit the viewport. #1
Description
From @HuongCu on March 18, 2015 0:0
When grid has vertical bar displayed, horizontal scroll is always visible even column widths fit the viewport. This plunker shows the example of issue:
http://plnkr.co/edit/ZllYpsC815Rp0UrdznlA?p=preview
Look at the code:
var rightPad = 0;
if ((i === cols.length - 1) && (sumWidth + col.width < grid.elementDims.rootMaxW)) {
rightPad = grid.elementDims.rootMaxW - sumWidth - col.width;
}
css += "." + gridId + " .col" + i + " { width: " + (col.width + rightPad) + "px; left: " + sumWidth + "px; height: " + rowHeight + "px }" +
"." + gridId + " .colt" + i + " { width: " + (col.width + rightPad) + "px; }";
rightPad doesn't take scrollH into account. Therefore the column with is a little bit over viewport.
Seems a similar scrollbar issue was reported in version 3.0 and fixed.
Copied from original issue: angular-ui/ui-grid#3044