Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
This repository was 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

Description

@AgDude

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions