I expect the Grid or Flow warn me about duplicate items. I expect there to be no error and no white / empty rows.
A mistake in using the framework should surely not trigger a warning like 'Cannot read properties of undefined (reading 'filter') Please submit an issue' or 'items is undefined Please submit an issue'.
there should be a way to detect that there's a duplicate item in the data set either the identical item was added (or returned by the data provider) or it was otherwise 'a.equals(b)' for two items a and b. If such a check is costly at run-time then maybe have a documented debug option.
Certainly empty rows mask away the underlying problem. Interestingly, Vaadin 14.3.1 would show the same items again as mentioned above - so here this is more of a hint to the programmer what mistake they must have made. Maybe instead of wrong warnings a mechanism could be created instead that hints the programmer what he did wrong, as white lines (unknown to Vaadin outsiders) are most often the outcome of duplicate items.
Description
Try this code.
When scrolling, the data provider is trying to deliver the second page, but -it is buggy!- the same page is delivered again.
I get: There seems to be an error in Vaadin Grid: Cannot read properties of undefined (reading 'filter') Please submit an issue to https://github.com/vaadin/flow-components/issues/new/choose (Firefox)
or it shows There seems to be an error in Vaadin Grid: items is undefined Please submit an issue to https://github.com/vaadin/flow-components/issues/new/choose (Chrome)
Expected outcome
I expect the Grid or Flow warn me about duplicate items. I expect there to be no error and no white / empty rows.
A mistake in using the framework should surely not trigger a warning like 'Cannot read properties of undefined (reading 'filter') Please submit an issue' or 'items is undefined Please submit an issue'. there should be a way to detect that there's a duplicate item in the data set either the identical item was added (or returned by the data provider) or it was otherwise 'a.equals(b)' for two items a and b. If such a check is costly at run-time then maybe have a documented debug option.
Certainly empty rows mask away the underlying problem. Interestingly, Vaadin 14.3.1 would show the same items again as mentioned above - so here this is more of a hint to the programmer what mistake they must have made. Maybe instead of wrong warnings a mechanism could be created instead that hints the programmer what he did wrong, as white lines (unknown to Vaadin outsiders) are most often the outcome of duplicate items.
Minimal reproducible example
See above.
Steps to reproduce
See above.
Environment
Vaadin version(s): 23.2.2 OS: not applicable
Browsers
Issue is not browser related