Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

ngGrid- version 2.x - Horizontal scrollbar appears even if column widths fit the viewport. #1

Open
AgDude opened this issue Nov 13, 2015 · 0 comments
Labels

Comments

@AgDude
Copy link
Contributor

AgDude commented Nov 13, 2015

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant