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

Row Selection column is not totally rendered for the last rows #6292

Closed
vschimpf opened this issue Jul 3, 2017 · 8 comments · Fixed by #6534
Closed

Row Selection column is not totally rendered for the last rows #6292

vschimpf opened this issue Jul 3, 2017 · 8 comments · Fixed by #6534

Comments

@vschimpf
Copy link

vschimpf commented Jul 3, 2017

This happens when having pagination and showing 25 rows or more.
The height of that panel is less than the table content.

uigrid

This could be related to issue #3394
I've tried with latest version 4.0.6

Here is an example (expand all rows)
http://plnkr.co/edit/eicEjc0diANjhdgoZpWt?p=preview

@HaroldStruwig
Copy link

I am also experiencing this issue - looks like it incorrectly evaluates the following as true for the selection column:

ng-if="colContainer.needsHScrollbarPlaceholder()"

@tarzasai
Copy link

In 4.0.7 too, the scrollbar placeholder appears when the horizontal scrollbar is not even there:

Imgur

@andrewkittredge
Copy link
Contributor

I might have a hacky fix for this.

I believe the return value of needsHScrollbarPlaceholder on the pinned, 'left', container needs to change based on whether or not there is a scrollbar on the 'main' container. Detecting the presence of the scrollbars on elements turns out to be difficult. My approach is to compare the canvas's width to its parent's width.

I modified GridRenderContainer.prototype.needsHScrollbarPlaceholder on line 8989 of the ui-grid.js I get from npm.
GridRenderContainer.prototype.needsHScrollbarPlaceholder = function () { if (this.name === 'left') { var $body = $("div[container-id=\"'body'\"]"); var $bodyCanvas = $body.find('.ui-grid-canvas'); return $body[0].clientWidth < $bodyCanvas[0].clientWidth; } else { return this.grid.options.enableHorizontalScrollbar && !this.hasHScrollbar && !this.grid.disableScrolling; } };

@cwalther
Copy link

I have not tried it but I suspect this will not work

@andrewkittredge
Copy link
Contributor

andrewkittredge commented Nov 30, 2017 via email

@httpete
Copy link

httpete commented Dec 5, 2017

I see cases where the last row scrolls away from the checkbox row when you go to the bottom of the list. Generally the sizing algorithm is squirrely.

@jeffantosh
Copy link

#6244

PR was declined because I couldn't get the unit tests to work. But this can be a starting point for those who wish to look into the issue.

mportuga pushed a commit that referenced this issue Jan 16, 2018
After reading over the comments by @cwalther on issue #6474, I decided to revert some of the changes

done in commit 21819c5.

fix #6292, fix #6474, fix #6484
mportuga pushed a commit that referenced this issue Jan 16, 2018
After reading over the comments by @cwalther on issue #6474, I decided to revert some of the changes

done in commit 21819c5.

fix #6292, fix #6474, fix #6484
@nathanbeach
Copy link

I was struggling with this scrollbar blank area using expandable in 4.0.2. finally upgraded to 4.7.1 and now the enableHoriztonalScrollbar option actually works, e.g.:

  enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER,

Doesn't work with just "false". Thought this might help someone.

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

Successfully merging a pull request may close this issue.

8 participants