Vaadin Grid Disable Scrolling

We are using vaadin grid and manage paging by just calling “scrollTo” on different rows (in order to leverage vaadin grid’s virtual paging) and want to disable scrolling on the table (otherwise it becomes a “scroll trap” for your mouse on our page). We tried adding “overflow: hidden” on different elements, but it doesn’t seem to be working. Is there a way to disable scrolling?

The scrolling in the grid is handled by custom mouse/touch event handling, so just putting “overflow: hidden” on the elements won’t make a difference, unfortunately.

I don’t think there’s any easy way to disable it currently.

Would there be any way this could be added to the road map, then?

Which grid version are you using btw, just to make sure: the vaadin-grid Polymer element (vaadin-grid.html), or the Java framework Grid component (Grid.java)? You posted this topic under the “Elements” category, which indicates that you would be using the web component. But there have been a lot of topics in the wrong category before, so that’s why I’m asking :slight_smile:

If you are using the Polymer element, then you can mimic paging using the data source, without the need to explicitly disable scrolling. See this example:
https://vaadin.com/docs/-/part/elements/vaadin-grid/headers.html#pagination

There’s currently a problem with that example, though, when you set the controls using the light DOM in the grid footer. You should in any case set the pagination controls outside the grid, not inside the footer, then it should work nicely.

We are using the polymer element, definitely appreciate the double check, for sanity’s sake.

We have pagination controls for other components that we want to reuse (for a consistent code base), and they are dumb about the data (we didn’t see the value in chunking the data on the client with true paging, since vaadin-grid reuses the dom elements already). Since we currently can not disable scrolling, that is a good “in the mean time” solution, thanks! Could we make a feature request to expose disabling/enabling scroll/mouse events, though?

Yes, absolute! All user feedback and requests are gold to us, so please go ahead and open a new issue in
https://github.com/vaadin/vaadin-grid/issues

Awesome. Issue made. Thanks for the help! https://github.com/vaadin/vaadin-grid/issues/336