Skip to content

Fix restore on multiple pages#3388

Merged
Corepex merged 9 commits into2025.4from
2233-recycle-bin-restore-over-multiple-pages-does-not-work
May 5, 2026
Merged

Fix restore on multiple pages#3388
Corepex merged 9 commits into2025.4from
2233-recycle-bin-restore-over-multiple-pages-does-not-work

Conversation

@Corepex
Copy link
Copy Markdown
Contributor

@Corepex Corepex commented Apr 22, 2026

Changes in this pull request

Resolves #2233

Additional info

This pull request refactors how selected rows and their types are managed in the recycle bin module. The main improvement is the introduction of a custom context that tracks both the selection state and the types of selected items, enabling batch actions to function without receiving the full items list as a prop. This change simplifies component interfaces and centralizes selection logic.

Refactoring and State Management Improvements:

  • Added a new SelectedRowsProvider and useSelectedRowsContext implementation in selected-items-context.tsx, which manages both the selected row IDs and a mapping of selected row types, and exposes methods to update and reset selection state. ([assets/js/src/core/modules/recycle-bin/context/selected-items-context.tsxR1-R85](https://github.com/pimcore/studio-ui-bundle/pull/3388/files#diff-92c0f882f3d0abfc06b7a887c7a703322e23488286de3e40768c6d2fdeeffe6aR1-R85))
  • Updated Table and BatchActions components to use the new context, removing the need to pass the full items list to batch actions and enabling selection state updates to also track item types. ([[1]](https://github.com/pimcore/studio-ui-bundle/pull/3388/files#diff-97f4b6c11d9c15c7f700a092d0f962e6f73cf140d9082354a4203397e2b5ccbeL162-R162), [[2]](https://github.com/pimcore/studio-ui-bundle/pull/3388/files#diff-0eee8d5aefec832169bbd20008db851ae841ab5be5ab7ac17bee47ab01385bbfL20-R29), [[3]](https://github.com/pimcore/studio-ui-bundle/pull/3388/files#diff-0eee8d5aefec832169bbd20008db851ae841ab5be5ab7ac17bee47ab01385bbfL44-R39), [[4]](https://github.com/pimcore/studio-ui-bundle/pull/3388/files#diff-0eee8d5aefec832169bbd20008db851ae841ab5be5ab7ac17bee47ab01385bbfL56-R49), [[5]](https://github.com/pimcore/studio-ui-bundle/pull/3388/files#diff-3ea697f6b7512dc9ed9a4a2bf8895ab94383c1d1e1b2686b20abe25de9c33d27L81-R81))
  • Removed the old context implementation in selected-items-context.ts. ([assets/js/src/core/modules/recycle-bin/context/selected-items-context.tsL1-L17](https://github.com/pimcore/studio-ui-bundle/pull/3388/files#diff-4f33c104766830b0b0fe3c7a87255e02ba12054cb7376a35934ddb38ab6c3ef9L1-L17))
  • Updated provider usage in RecycleBinContainer to match the new provider signature. ([assets/js/src/core/modules/recycle-bin/recycle-bin-container.tsxL17-R17](https://github.com/pimcore/studio-ui-bundle/pull/3388/files#diff-89cf46593a70cb19e802436fc7d23d9df1d7b6e7c2dff49d2b04bdad155caf79L17-R17))

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

Copy link
Copy Markdown
Contributor

@xIrusux xIrusux left a comment

Choose a reason for hiding this comment

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

now it lgtm :)

@Corepex Corepex merged commit 196b887 into 2025.4 May 5, 2026
7 checks passed
@Corepex Corepex deleted the 2233-recycle-bin-restore-over-multiple-pages-does-not-work branch May 5, 2026 13:03
@github-actions github-actions Bot locked and limited conversation to collaborators May 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Recycle bin] restore over multiple pages does not work

2 participants