feat(paginator): Paginator option where total length of the dataset of unknown #28978
Labels
area: material/paginator
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P4
A relatively minor issue that is not relevant to core functions
Feature Description
The current paginator requires that the
length
property be set but unfortunately, not all data sources out there can give the total length of the dataset or even if they do give, the fundamental act of running count can be rather slow. I would like to have an optioninfiniteScroll
or another, with a better name, which when set, would emit the next page or previous page events until the data-source returns an empty set, thus letting the user know that they have reached the end of the dataset.Use Case
The total count of a table is normally found by counting all rows in relational dbs like PostgreSQL
Moreover, the resulting count is even slower when filters are applied. Filters are the expected part of any data table.
With an infinite scroll option, the user can keep firing the next page event without having to bog down the db with an expensive count query at the start.
The text was updated successfully, but these errors were encountered: