Skip to content

Conversation

@foodelix-admin
Copy link

Change Summary

when using useConfigure hook from react-instantsearch-hooks-web it is now possible to put sort_by parameter under the additionalSearchParameters object

useConfigure({
//...other configurations
additionalSearchParameters: {
sort_by: your sort rules,
// for example you can use it like this
// sort_by: location(${activeSearchRegion?.lat}, ${activeSearchRegion?.lon}):asc,
},
})

PR Checklist

@jasonbosco
Copy link
Member

This should already work without the changes in this PR.

In this line notice how the existing code has snakeCasedAdditionalSearchParameters.sort_by. That just uses params.additionalSearchParameters.sort_by after accounting for collection specific parameters, case sensitivity, etc.

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