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

updateRowCount shouldn't set virtual height when options.autoHeight is used #209

Closed
wants to merge 1 commit into from

Conversation

mblaney
Copy link

@mblaney mblaney commented Feb 28, 2018

Currently, the virtual height th is used to update h in updateRowCount, but when filtering and autoHeight are used options.rowHeight * numberOfRows can be less than the current viewport height, so th is set to the existing viewportH - scrollbarDimensions.height.

The problem in this case is that h is always set to oldH and so resizeCanvas doesn't get called. This is only a problem on mobile browsers since there is no scrollbar height factored in, on desktop browsers the scrollbar height means that h does change and resizeCanvas does get called, but that is more of an accident than intentional... the answer anyway is not to use virtual height with the autoHeight option at all.

ghiscoding added a commit that referenced this pull request Apr 6, 2019


- supersede PR #209
- this fix avoid some grid using autoheight to go circular reference (2 references calling each other).
@ghiscoding
Copy link
Collaborator

Thanks for the PR, I now see the problem in my own examples.
Closing in favor of #364 since your PR was done prior to the frozen feature.

Thanks again

@ghiscoding ghiscoding closed this Apr 6, 2019
@mblaney
Copy link
Author

mblaney commented Apr 9, 2019

ok thanks, #365 looks good.

@6pac
Copy link
Owner

6pac commented Apr 9, 2019

huge thanks for sorting this one @ghiscoding

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 this pull request may close these issues.

3 participants