Skip to content

Add prefetch to sort, pagination resets and fix params mutation#88

Open
excidence wants to merge 1 commit intoShopify:mainfrom
excidence:sortfilter-patch
Open

Add prefetch to sort, pagination resets and fix params mutation#88
excidence wants to merge 1 commit intoShopify:mainfrom
excidence:sortfilter-patch

Conversation

@excidence
Copy link
Copy Markdown

@excidence excidence commented Jan 13, 2025

This commit fixes:

  1. possible blank pages when paginating to the end and applying filters afterwards (e.g. last page + "out of stock" filter), by resetting pagination.
  2. mutating the search params in the getSortLink function, briefly breaking SortMenu label (or expected .get() value) until after navigation when useSearchParams is back on track.

Also adds prefetch behavior to SortMenu items.

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.

1 participant