Skip to content

Conversation

@HendrikThePendric
Copy link
Collaborator

@HendrikThePendric HendrikThePendric commented Sep 24, 2025

N/A

Description

I've done the following:

  • page is now required in the function signature of the PaginateFn
  • The onPaginate function in the LineListPlugin now also implements that type.
  • The StickyNavigation component now passes a page with value 1 when the pageSize changes.

The result of this is that:

  1. The line-list-plugin doesn't have to handle resetting to page 1 when the pageSize changes
  2. It also doesn't have to throw any errors, because the TS compiler won't allow the error case to happen anymore

Quality checklist

  • Dashboard tested N/A
  • Cypress and/or Jest tests added/updated
  • Docs added N/A
  • d2-ci dependency replaced N/A
  • Tester approved (@edoardo)

@dhis2-bot
Copy link

dhis2-bot commented Sep 24, 2025

🚀 Deployed on https://pr-66.event-visualizer.netlify.dhis2.org

edoardo
edoardo previously approved these changes Sep 24, 2025
Copy link
Member

@edoardo edoardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FIRST_PAGE and PAGE_SIZE could be removed now since they are only used in one place.

@dhis2-bot dhis2-bot temporarily deployed to netlify September 25, 2025 07:35 Inactive
@HendrikThePendric HendrikThePendric merged commit f25d36c into master Oct 1, 2025
13 of 25 checks passed
@HendrikThePendric HendrikThePendric deleted the refactor/on-paginate-signature branch October 1, 2025 13:53
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

Successfully merging this pull request may close these issues.

4 participants