Directory

← Back

InfiniteGrid

InfiniteGrid is a Grid like component that allows arbitrary amount of scrolling in both horizontal and vertical directions

Author

Contributors

Rating

Data for cells are fetched lazily on demand from server. InfiniteGrid is not extending or using Vaadin Grid and does not share features like resizable columns or row selection. It is aimed to provide a way to have an arbitrary number of columns without a performance penalty having elements outside visible scope. In practice the max scrollable area depends on browser limitations.

Sample code

InfiniteGrid infiniteGrid = new InfiniteGrid();
infiniteGrid.setCellSize(200, 40);
infiniteGrid.setItemCount(100000, 100000);
infiniteGrid.setTextOnly(true);
infiniteGrid.setHtmlGenerator((x,y)-> String.format("%d, %d", x,y));
InfiniteGrid infiniteGrid = new InfiniteGrid();
infiniteGrid.setCellSize(200, 40);
infiniteGrid.setItemCount(100000, 100000);
infiniteGrid.setComponentGenerator((x, y) ->
        new Button(
            String.format("%d, %d", x, y),
            e -> Notification.show(String.format("clicked (%d, %d)", x, y))
        ));

Links

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Exclude flow-build-info.json from build in order to avoid addon polluting the application using it

Released
2023-04-05
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 24+
Polymer 3.0+ in 0.7
Polymer 2.0+ in 0.7
Vaadin 10+ in 0.7
Browser
Firefox
Safari
Google Chrome
iOS Browser
Android Browser
Microsoft Edge
Online