Open Mitch64 opened 1 year ago
Let's check if it is a regression from Vaadin 23.
Can reproduce this. As mentioned in the description, the horizontal scroll bar needs to be visible. Also this seems to be only reproducable if scroll bars are permanently visible. So for example on Windows, or also an macOS if scroll bars are configured to be shown permanently in the system settings. It's not reproducable on macOS if scroll bars are configured to only show when scrolling. It logs the same error message as reported above, which indicates that the grid tries to fetch all pages in a single request:
Attempted to fetch more items from server than allowed in one go: number of items requested '500050', maximum items allowed '500'.
It's also reproducable with Vaadin 23.3, so probably not a regression.
macOS, scroll bars permanently visible, not working
https://user-images.githubusercontent.com/357820/234600220-d59a21eb-e875-42dd-9fb4-6da641cc1f9f.mov
macOS, scroll bars shown when scrolling, working
https://user-images.githubusercontent.com/357820/234600314-f62ea57e-0b97-4aa6-9ea5-6106b180b9db.mov
This can be a bug in the virtualizer. It appears to render rows non-sequentially under the described circumstances.
Description
When you have a big lazy-loading grid and you scroll down with the vertical scrollbar directly from the first rows to the last rows, these are not displayed. When you instead programmatically scroll to the end using
grid.scrollToIndex(NUM_ROWS-1)
all works without problems. The problem also does not occur (according to my tests) as long as the grid has not a horizontal scrollbar. That means, if the grid has less columns than the number of columns where a horizontal scrollbar is displayed, there is no problem. In the first place it is clear why the rows are not displayed. There is even a warning message in the logs: "Attempted to fetch more items from server than allowed in one go: number of items requested '500050', maximum items allowed '500'." I did some research in theJavaScript
code usingconsole.log()
statements and it looks like the wrong number of rows to request from theDataProvider
is calculated there, but as I am no expert I was not able to find the cause.Expected outcome
The rows are displayed no matter how or where the horizontal scrollbar is scrolled to.
Minimal reproducible example
Steps to reproduce
MainView
class from above. DeleteGreetingService.java
Application.java.
: Directly after start, scroll (directly!) down to the last rows or to rows near the end. When NUM_COLS is 5, no problem exists. If NUM_COLS is, let's say 50, the problem exists. In my case the problems start, when NUM_COLS is 14 or above, because then the grid shows a horizontal scrollbar. However, when, after starting the program, you click the button below the grid to scroll to the last rows, no problem occurs. Only when the vertical scrollbar is used, the problem occurs.Environment
Vaadin version(s): 24.0.4 OS: macOS 12.6.5 also tested on Windows 10 21H2 I checked with several browsers, Safari 16.4.1, Chrome 112.0.5615.137, Firefox 112.0.2 so the issue does not seem to be browser related
Browsers
Issue is not browser related