Skip to content

[5.x] Don't show hits too early#1238

Merged
royduin merged 1 commit intomasterfrom
feature/fix-hits-loading-too-early
Mar 20, 2026
Merged

[5.x] Don't show hits too early#1238
royduin merged 1 commit intomasterfrom
feature/fix-hits-loading-too-early

Conversation

@Jade-GG
Copy link
Copy Markdown
Collaborator

@Jade-GG Jade-GG commented Mar 18, 2026

ref: BORDEX-1356

We found that there was a race condition in the listing: The ais-hits component got loaded in too early, causing it to load in without any customized filters or sorting first, only changing to be correct after the filters loaded in.

This PR makes it so the hits component will not show up before the first request has been completed, which (in my testing) solves this issue. Instantsearch will always end up doing a request, even without ais-hits, so this change cannot cause the component to not show up at all.

Note that this does not solve the issue of several unnecessary requests being made to elasticsearch, it just makes sure there's no jumps in the items that are shown on listing pages.

@royduin royduin merged commit ac134b0 into master Mar 20, 2026
13 of 15 checks passed
@royduin royduin deleted the feature/fix-hits-loading-too-early branch March 20, 2026 10:56
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.

3 participants