-
Notifications
You must be signed in to change notification settings - Fork 263
Open
Labels
Description
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
for(var grpName in _groups) {
nbGroups += 1;
$('<div/>', {
'class': 'ms-res-group',
html: grpName
}).appendTo(ms.combobox);
self._renderComboItems(_groups[grpName].items, true);
}
_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
getupkid