Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Angular Paginator Component #168

Open
richard-to opened this issue Apr 28, 2024 · 2 comments
Open

Add Angular Paginator Component #168

richard-to opened this issue Apr 28, 2024 · 2 comments

Comments

@richard-to
Copy link
Collaborator

Angular's Paginator Component (https://material.angular.io/components/paginator/overview) is can be used separately from the table component.

So we should probably create the component separate since it I can definitely see use cases for a paginator that's not part of a table.

In addition the paginator can be probably declared separate of the mesop table component. The paginator event could update the the dataframe for pagination, which would then be passed to the table component.

This would require that the table component have a parameter to know what slice of the data table to show.

Alternatively, we may want to embed the paginator within the table component as well. I think this option only makes sense if the API for specifying the dataframe slice is not intuitive and easy to understand.

@wwwillchen
Copy link
Collaborator

I think it would be good to have some examples of the API for using paginator w/ the table, if it's a separate component. I'm a little concerned it would add some boilerplate for common use cases.

For example, it's quite common to have large dataframes (e.g. thousands of rows) where pagination is almost always desirable. Colab has a dataframe table component which provides pagination and is quite handy. IMO, it would be nice where something like me.table(df) would automatically do pagination (e.g. 25 rows/per page and the user can select different options for page sizes, e.g. 25, 50, 100).

Also, we could support having both paginator embedded within table (for this default/common use case) and having a separate paginator component.

@richard-to
Copy link
Collaborator Author

That's a good point about it being more user friendly if the paginator was embedded in the table for the common use case.

On a side note I'm planning to write up a quick design doc for the detailing the rest of the table API since I think to implement the sticky columns and column styling stuff will require some design decisions that may affect other feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants