Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template for ui-grid incorrectly sets last row's bottom border #4413

Closed
dbrink opened this issue Sep 21, 2015 · 2 comments
Closed

Template for ui-grid incorrectly sets last row's bottom border #4413

dbrink opened this issue Sep 21, 2015 · 2 comments

Comments

@dbrink
Copy link

dbrink commented Sep 21, 2015

The bottom border on the last row is never made visible because the binding expression references grid.getTotalRowHeight() which isn't defined.

.grid{{ grid.id }} .ui-grid-row:last-child .ui-grid-cell {
   border-bottom-width: {{ ((grid.getTotalRowHeight() < grid.getViewportHeight()) && '1') || '0' }}px;
}
@RobPierce
Copy link
Contributor

RobPierce commented Dec 21, 2017

I see this has been around for a long time, I've come up with a slight tweak to this that should achieve the result that the logic here seemed to be trying to create, given the getTotalRowHeight function doesn't exist:

Replace grid.getTotalRowHeight() with (grid.getVisibleRowCount() * grid.options.rowHeight)

I'll create a PR for this.

RobPierce added a commit to RobPierce/ui-grid that referenced this issue Dec 21, 2017
The logic that sets the bottom-border-width for the last row calls a function that doesn't exist - grid.getTotalRowHeight() (issue logged in angular-ui#4413) so I've updated it slightly to calculate this value using the grid.getVisibleRowCount() multiplied by grid.options.rowHeight which should achieve the desired effect of the original logic.
mportuga pushed a commit that referenced this issue Dec 22, 2017
The logic that sets the bottom-border-width for the last row calls a function that doesn't exist - grid.getTotalRowHeight() (issue logged in #4413) so I've updated it slightly to calculate this value using the grid.getVisibleRowCount() multiplied by grid.options.rowHeight which should achieve the desired effect of the original logic.
@mportuga
Copy link
Member

#6515

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

No branches or pull requests

3 participants