preserve selections across pages #6357
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes ENG-867
Description Of Changes
Updates the Action Center tables to persist row selections across pagination. This allows users to select items on multiple pages and perform bulk actions on the entire selection. The total count of selected items is now accurately displayed and updated as the user navigates through pages. Selections are reset when filters or tabs are changed to avoid unintended actions.
Code Changes
DiscoveredAssetsTable.tsx
&DiscoveredSystemAggregateTable.tsx
selectedRows
state array with aselectedRowsMap
to store selections across all pages.rowSelection.onChange
logic to manage theselectedRowsMap
, preserving selections when paginating.useEffect
to sync the visible checkbox state (selectedRowKeys
) with the persisted selections for the current page.Steps to Confirm
Pre-Merge Checklist
CHANGELOG.md
updatedmain
downgrade()
migration is correct and works