Skip to content

Commit

Permalink
Merge pull request #688 from AnhNhan-NUR/erxjstomanyeditor_selection_…
Browse files Browse the repository at this point in the history
…sort

ERXJSToManyRelationshipEditor: Selections are also sorted
  • Loading branch information
darkv committed Nov 18, 2015
1 parent f251c8f commit ae25147
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ private NSArray selectionsFromBindings() {
if (canGetValueForBinding(Keys.Selections)) {
NSArray result = (NSArray)valueForBinding(Keys.Selections);
if(result != null) {
if (hasBinding(Keys.SortKey)) {
String sortKey = stringValueForBinding(Keys.SortKey);
result = ERXArrayUtilities.sortedArraySortedWithKey(result, sortKey);
}
return result;
}
}
Expand Down

0 comments on commit ae25147

Please sign in to comment.