Sort MenuSelect options alphabetically - React InstantSearch

Hi there, quick and hopefully simple one… I’m just looking to sort the options within a MenuSelect alphabetically, as oppose to which one has the most results. Sounds simple but I can’t seem to find any guidance or props to facilitate it.

Thanks for your help!

Mark

Hi Mark :wave:

If you want to apply a different sort, you should leverage the transformItems prop of the MenuSelect component. You will receive the array of items and you can return a sorted version of it.

See transformItems documentation

I hope this helps!

Cheers

1 Like

Perfect, thanks so much Vincent!