there is a need to paginate mat-table by the number of groups, not records. The records, which are shown in the mat-table are grouped by a column. The functionlaity which needs to be done is about using groups for pagination instead of the entries itself.
For example, I load a grid of products, where each product has a category name. The items in the mat-table are grouped by the category name. The odata should paginate entries by the count of categories instead of the the products in the grid. Any ideas how this is done?
The visual example is as follows:
Category Name Product Name (page 1, three categories per page)
Category | Product |
---|---|
toys | product1 |
product2 | |
product3 | |
kitchen | prod1 |
prod2 | |
garden | productsN |
productsN | |
productsN | |
productsN |
page 2, three categories per page:
Category | Product |
---|---|
moto | product6 |
product7 | |
closes | prod5 |
prod12 | |
prod13 | |
prod14 | |
prod15 | |
shoes | productsV |
is it possible to do using the Microsoft Odata? Provided that the odata is sending product information with ability to paginate and filter / sort products