What’s up ? I’m interested in using this firitin @Matti pagination but I can’t filter well after paginating, any idea ?
Haven’t used the pagination grid before, but for me the setItems
call in your github sample looks suspicous plus the data provider seems to not use the filter value at all.
Normally, when using lazy loading data providers with filters, you pass the filter data to the size and fetch methods, where, depending on your backend logic, the filter is passed to the database or filtering the stream or whatever. I assume, that this approach is the same here.
mmmm interesting, about the setItemsPageable
what version of Vaadin Flow are we talking about ?
I am using 24.5.5
.
Afaik there hasn’t been a change in the data provider behavior lately, so any 24 should be fine.
I am not sure about the setItemsPageable
- is that from the addon? (at least I did not found it in the sources).
Ok, that’s why I can’t find it either.
I found it now. It is relatively new, starting from 24.7.0 as it seems. But that method refers to Spring JPA paging. Not sure, if that is compatible with the paging grid.
setItemsPageable
is only a shorthand for converting Vaadin’s generic data provider query object into a Spring Pageable
that can be used directly with various methods from Spring Data. Before that method was introduced, you had to manually do that conversion in application logic.