Skip to content

fix(lxlweb): sorting does not persist - #1675

Open
jesperengstrom wants to merge 6 commits into
developfrom
fix-lxlweb-sorting-does-not-persist
Open

fix(lxlweb): sorting does not persist#1675
jesperengstrom wants to merge 6 commits into
developfrom
fix-lxlweb-sorting-does-not-persist

Conversation

@jesperengstrom

@jesperengstrom jesperengstrom commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

Solves

A combination of bugs have caused the search result sorting to be silently flawed.

  • After changing sort, the facet links were not updated with the new value, causing sorting to reset when using them.
  • Sorting component was then not reactive to this reset, still showing the user selection. Only by looking at the actual results, you realize something's wrong.

Have fixed:

  • using :bind on the select element, the component is now reactive to url changes, displaying the actual sorting
  • added tracking of _sort to the find layout load function where the facets are fetched (but sort param was forgotten)

Also discovered some more bugs:

  • Lang-sensitive sort keys were not reactive to locale change. Fixed, now updating as expected
  • Supersearch pill remove links did not update its data after sort change, also causing sorting to reset. Fixed, data is now manually fetched again after navigation when sorting has changed.

Also wrote a couple of tests to keep track of this feature

Summary of changes

Summary of changes

  • Use bind:value={sortOrder} in SearchResultSort component
  • Updated /find layout.server with _sort as reactive param
  • Observe sort change in SupersearchWrapper, fetch data manually again
  • Add tests

@jesperengstrom
jesperengstrom marked this pull request as ready for review August 28, 2026 14:33
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