Skip to content

Commit

Permalink
Update contactList_controller.js
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv committed Mar 31, 2016
1 parent 3da03eb commit e98b9f1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions js/components/contactList/contactList_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ angular.module('contactsApp')
$scope.$apply(function() {
ctrl.contacts = contacts;
if (!_.isEmpty(ctrl.contacts)) {
ctrl.setSelectedId(_.sortBy(contacts, function(contact) {
return contact.fullName();
})[0].uid());
ctrl.setSelectedId($filter('orderBy')(contacts, 'fullName()')[0].uid());
}
ctrl.loading = false;
});
Expand Down

2 comments on commit e98b9f1

@skjnldsv
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sortBy function doesn't behave like the orderBy angular function which sort the special characters first.
Fix #312 part #1

@Henni
Copy link
Contributor

@Henni Henni commented on e98b9f1 Mar 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.