I am thinking a way to combine data provider of grid and pagination together. After looking around forum, I’m still not found any answer than using addon. The reason i don’t want to use addon because I want to customize my own UI, how its look.
The current data provider have good lazy loading functional, but assume I’m having 1000 data, and I will get it through REST API. So I created a grid with 20 data/page, everytime i change my page to next page, the data provider would like to request to API to get next 20 data then show to vaadin grid.
But now, I am still out of idea how to implement that idea. If anyone implemented this feature, please guide me.
To elaborate on the example a bit: if you’re using pages, there’s no reason to use a lazy loading DataProvider at the same time. Just load the items of the current page into memory and put them into the Grid. Keep track of the current page number, items per page and the amount of pages yourself and you’re left with free hands to implement the UI part yourself as you wish.