When magic suggest is initializes with groupBy:true it seems to place the groups in an unpredictable order. There's no preference for sorting the groups. I suggest adding a groupByOrder config option that takes the following options 'asc', 'desc', '[array of groups]'. The user can set their preferred order using an array of groups.
The relevant code is here: magicsuggest.js line 677
_groups will need to be cast as an array, though. Currently it's an object, resulting in the unpredictable order of groups. See more here re: this randomness here: https://stackoverflow.com/a/2647228/3198281
When magic suggest is initializes with
groupBy:true
it seems to place the groups in an unpredictable order. There's no preference for sorting the groups. I suggest adding agroupByOrder
config option that takes the following options 'asc', 'desc', '[array of groups]'. The user can set their preferred order using an array of groups.The relevant code is here: magicsuggest.js line 677
_groups
will need to be cast as an array, though. Currently it's an object, resulting in the unpredictable order of groups. See more here re: this randomness here: https://stackoverflow.com/a/2647228/3198281