Open davidklebanoff opened 6 years ago
Related #261
Update: If you wish to implement sorting as a separate component, we recommend you to create a react dropdown component for showing sort options and utilise the defaultQuery
prop of the ReactiveList (or any result component).
The trick is to update the defaultQuery
(containing sort query based on the active selection) prop of the result component whenever there is a change in the value of your sort dropdown component.
Hope this helps! I will also attach a demo app here in the comments sometime later for ease.
@metagrover - Got it. A demo would be great!
I will also attach a demo app here in the comments sometime later for ease.
@metagrover wanted to follow up on this -- I've been having the toughest time getting this to work locally -- is there any way you can post a working example here please? 🙏
It would be a huge help!!
Issue Type: enhancement
Description: Currently, to the best of my knowledge, the sorting features are embedded in the result components. Perhaps it should be moved into a separate components for added flexibility/customizability?
Interestingly enough, on the ReactiveSearch homepage there is a picture showing a "sort by" dropdown beside the search form. Is this ability supported out of the box or is it a custom component?