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

No horizontal scrollbar when autoHeight = true #356

Closed
DarranShepherd opened this issue Mar 27, 2019 · 7 comments · Fixed by #360
Closed

No horizontal scrollbar when autoHeight = true #356

DarranShepherd opened this issue Mar 27, 2019 · 7 comments · Fixed by #360

Comments

@DarranShepherd
Copy link
Contributor

Editing the columns array definition in example11-autoheight.html to the below, the grid can be scrolled horizontally using a trackpad/mouse, no horizontal scrollbar is displayed.

columns = [
  { id: "title", name: "Title", field: "title", width: 200 },
  { id: "duration", name: "Duration", field: "duration", width: 200 },
  { id: "%", name: "% Complete", field: "percentComplete", width: 200 },
  { id: "start", name: "Start", field: "start", width: 200 },
  { id: "finish", name: "Finish", field: "finish", width: 200 },
  { id: "effort-driven", name: "Effort Driven", field: "effortDriven", width: 200 }
]

NoHorizontalScroll

Is this expected behaviour? If not, could anyone give me a pointer to where I might be able to resolve it?

From my investigation, the scrollbar appears to be there on the viewport, but because the viewport's container, .slick-pane-top.slick-pane-left, height is set to the height of the viewport, it's below the bottom of the top left pane. I've experimented with adding the height of the scrollbar to the top pane, but at this stage, viewportHasHScroll hasn't yet been calculated, and even when doing so, the canvas appears to have a little extra padding below the final row, so simply adding the height of the scrollbar is insufficient.

HalfHorizontalScroll

@6pac
Copy link
Owner

6pac commented Mar 27, 2019

Happy to take a look at this. @ghiscoding and @SatanEnglish, you have been doing a lot of work recently regarding viewport dimensions, do you want to take a look or shall I?

@ghiscoding
Copy link
Collaborator

The last change we did related to the autoHeight was the grid missing some rows on the vertical side, nothing on the horizontal side of it. I'm wondering if it's any related to the frozen feature added, might be useful to try it with previous 2.3.x version. I don't really have time to look into this myself

@DarranShepherd
Copy link
Contributor Author

I can confirm that the scrollbar is present in version 2.3.23

HorizontalScrollIn2-3-23

@6pac
Copy link
Owner

6pac commented Mar 29, 2019

that's a good clue. will try to have a look on Sunday

@ghiscoding
Copy link
Collaborator

ghiscoding commented Mar 30, 2019

Pushed a fix #360 since I had a bit more knowledge with autoHeight and frozen feature. You can see animated gif of the fix in PR #360

@DarranShepherd could you please confirm that the new code works for you. Thanks

@6pac
Copy link
Owner

6pac commented Mar 31, 2019

awesone, thanks @ghiscoding

@6pac 6pac closed this as completed in #360 Apr 1, 2019
6pac added a commit that referenced this issue Apr 1, 2019
fix(autoHeight): horizontal scroll not showing when needed, fixes #356
@DarranShepherd
Copy link
Contributor Author

Sorry for the delayed response, @ghiscoding , @6pac , I was away for the weekend.

This PR fixes my issue perfectly. Thanks so much for such a quick resolution.

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.

3 participants