Skip to content

DataViews: Selection does not persist across pages#71697

Open
imrraaj wants to merge 1 commit into
WordPress:trunkfrom
imrraaj:fix/selection-on-pagination-dataview
Open

DataViews: Selection does not persist across pages#71697
imrraaj wants to merge 1 commit into
WordPress:trunkfrom
imrraaj:fix/selection-on-pagination-dataview

Conversation

@imrraaj

@imrraaj imrraaj commented Sep 16, 2025

Copy link
Copy Markdown
Contributor

What?

This issue fixes the issue when the DataView component is paginated, and selection doesn't persist across multiple pages.

Why?

Closes #71269

How?

This PR fixes a bug in the implementation of selection logic that removes the previously selected items when page changes.

Testing Instructions

  1. Open the storybook story for DataViews
  2. Select some item on the first page of dataviews (click the checkbox to ensure you multiselect)
  3. Go to the second page and select some more items using the checkbox
  4. Go back to the first page

Expected: The items selected in step 2 remain selected
Before: The items selected in step 2 are now deselected
After: The items remain selected

Screenshots or screencast

Screen.Recording.2025-09-16.at.5.49.02.PM.mov

@imrraaj imrraaj requested a review from oandregal as a code owner September 16, 2025 12:22
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: imrraaj <imrraaj@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Package] DataViews /packages/dataviews labels Sep 18, 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] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataViews: Selection does not persist across pages

2 participants