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

feat: Enable / Disable Per View Pagination filter in DataViews. #69199

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

singhakanshu00
Copy link
Contributor

What?

Closes #69193

Why?

Some data sources DataViews interacts with don't support per-page pagination. The issue is that there's no way for the DataViews component to display only previous/next links

How?

  • Adds enablePerView flag in the paginationInfo. paginationInfo is passed as an prop to DataViews component.
  • By default it will be true and will show the Per Page filter.
  • If passed false, it will not render the filter.

Testing Instructions

  • You can create a custom component using DataViews.
  • Pass true to enablePerPageFilter to paginationinfo along with totalItems and totalPages.
  • The Per Page pagination filter will not be visible.

or,

  • You can open the Template List from the site editor.
  • In the code add the true to enablePerPageFilter to paginationinfo and pass it as prop to the DataViews component.
  • The Per Page pagination filter will not be visible.

Screenshots or screencast

With Per Page filter enabled (default)
code1

With Per Page filter disable:
code

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Package] DataViews /packages/dataviews labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Package] DataViews /packages/dataviews [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataViews: disable per-page pagination
2 participants