Lazy loading

how to lazyloading for my list on layout like a infinite scroll.

Hi, look at https://vaadin.com/docs/v14/flow/binding-data/tutorial-flow-data-provider.html

Hector Licea:
Hi, look at https://vaadin.com/docs/v14/flow/binding-data/tutorial-flow-data-provider.html

the tutorial flow for a grid vaadin, but i’m use for vertical layout.

like infinite scroll

verticalLayout.setHeight("9999999999999999999999999px"); like this?

Jokes aside, There is no such functionality for vertical layouts. You could use a Grid with a single column, whose renderer can be defined to display everything you need. You can style the rows so that the user doesn’t realize it’s a grid - he thinks it’s basically a verticalLayout. Then you use a lazy loading data provider for the grid, linked above by Hector.

There is an example for exactly this in vaadins bakery example app. You can see the it online: [https://bakery-flow.demo.vaadin.com/]
(https://bakery-flow.demo.vaadin.com/). This example demonstrates how you don’t recognize it as a grid, but instead you think it’s an “infinite scroll layout”