Skip to content

fix: preserve pagination params when opening CMS item sheet#111

Merged
liamwalder merged 2 commits intodevelopfrom
fix/cms-sheet-pagination-reset
Mar 30, 2026
Merged

fix: preserve pagination params when opening CMS item sheet#111
liamwalder merged 2 commits intodevelopfrom
fix/cms-sheet-pagination-reset

Conversation

@lunenas
Copy link
Copy Markdown
Collaborator

@lunenas lunenas commented Mar 30, 2026

Summary

Fix a bug where changing CMS pagination from 25 to 50 items and then opening
a collection item sheet resets pagination back to 25 and switches the sheet
to "Create Item" mode instead of "Edit".

Changes

  • Preserve page, limit, and search query params in navigateToCollectionItem and navigateToNewCollectionItem instead of replacing them
  • Pass current pagination state (currentPage, searchQuery, pageSize) when closing the item sheet via navigateToCollection

Test plan

  • Set pagination to 50 items, open an item sheet — pagination stays at 50 and sheet shows "Edit"
  • Open an item from page 2, close sheet — stays on page 2
  • Search for items, open one, close sheet — search query is preserved
  • Create new item — pagination params preserved in URL

Made with Cursor

lunenas and others added 2 commits March 30, 2026 09:37
navigateToCollectionItem was replacing all URL query params with only
the edit param, dropping limit/page/search. The URL sync effect then
reset pageSize to 25, causing items beyond position 25 to disappear
and the sheet to show "Create Item" instead of "Edit".

Made-with: Cursor
@liamwalder liamwalder merged commit ef2b57d into develop Mar 30, 2026
2 checks passed
@liamwalder liamwalder deleted the fix/cms-sheet-pagination-reset branch March 30, 2026 12:57
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.

2 participants