Reactivesearch: Custom sorting of MultiList items

Created on 5 Jun 2018  路  5Comments  路  Source: appbaseio/reactivesearch

Issue Type: Enhancement

Platform: Web

Description:
I'm trying to make it so the MultiList list items are sorted by a specific 'sort' field, the sortBy prop only allows for 'asc', 'desc' and 'count'. It would be awesome you could specify a custom sortBy field.

enhancement

Most helpful comment

Sure. So I have a 'Level/Floor' filter and these levels have to be in a specific order, so they have an integer order value. I need to be able to sort the list items by this order value. E.g.

Level 10
Level 9
...
Ground Floor
Basement
etc.

All 5 comments

I'm trying to understand what the desired goal is here. Do you have an example use case?

Sure. So I have a 'Level/Floor' filter and these levels have to be in a specific order, so they have an integer order value. I need to be able to sort the list items by this order value. E.g.

Level 10
Level 9
...
Ground Floor
Basement
etc.

Anyone know a way that this might currently be achieved?

+1

This can be achieved now with the transformData prop - https://opensource.appbase.io/reactive-manual/list-components/multilist.html.

Was this page helpful?
0 / 5 - 0 ratings