Join Slack
Powered by
With Algolia there is an option to set the orderin...
# community-help
s
Sean Campbell
09/30/2021, 8:32 PM
With Algolia there is an option to set the ordering of a facet to alphabetical. Is there a way to do this with Typesense? I ask because the Refinements component renders selected facet values to the top. Which I think confuses users.
j
Jason Bosco
09/30/2021, 8:34 PM
@Sean Campbell
You can configure that behavior using this option in InstantSearch:
https://www.algolia.com/doc/api-reference/widgets/refinement-list/js/#widget-param-sortby
Jason Bosco
09/30/2021, 8:35 PM
(Assuming you're using Instantsearch lib with Typesense)
s
Sean Campbell
09/30/2021, 8:36 PM
Yep, well the react headless version
j
Jason Bosco
09/30/2021, 8:38 PM
I see, looks like the they don't have an equivalent configuration in react-instantsearch. So you might have to sort items as needed using `transformItems`:
https://www.algolia.com/doc/api-reference/widgets/refinement-list/react/#widget-param-transformitems
s
Sean Campbell
09/30/2021, 8:43 PM
I should not have overthought this. I got the result with a normal js array sort on
items
🙌 1
Open in Slack
Previous
Next