Skip to content

Fixed sortingFilter param in gdpr extractor#3333

Open
Corepex wants to merge 2 commits into2025.4from
2885-gdpr-sorting-only-works-on-the-first-page
Open

Fixed sortingFilter param in gdpr extractor#3333
Corepex wants to merge 2 commits into2025.4from
2885-gdpr-sorting-only-works-on-the-first-page

Conversation

@Corepex
Copy link
Copy Markdown
Contributor

@Corepex Corepex commented Apr 13, 2026

Changes in this pull request

Resolves #2885

Additional info

This pull request refines the sorting and pagination logic in the GDPRDataExtractorContainer component to improve user experience and state management. The main focus is on ensuring that changing the sort order resets the page to 1 and that the sort state is properly tracked and updated.

Improvements to sorting and pagination logic:

  • Added a new sortFilter state using useState to track the current sort order.
  • Updated the executeSearch function to:
    • Set the sortFilter state when a new sort is applied.
    • Reset the page to 1 when the sort filter changes and no explicit page override is provided, ensuring users always start at the first page after sorting.
    • Keep the current page unless a sort change occurs, in which case the page is reset.

@Corepex Corepex self-assigned this Apr 13, 2026
@Corepex Corepex linked an issue Apr 13, 2026 that may be closed by this pull request
@Corepex Corepex requested a review from xIrusux April 13, 2026 08:47
@sonarqubecloud
Copy link
Copy Markdown

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.

[GDPR] sorting only works on the first page

1 participant