diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2020-09-06 16:16:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-06 16:16:46 +0200 |
commit | 61443420ebb0135654f933563361d95fc97fbcac (patch) | |
tree | 20215c85952cea53ed4aadf03099b2a7785dc4ae /src | |
parent | ead1bfa19dfd694563fcf2be756963b3b07cb7dd (diff) | |
parent | 13abadd4b9f2c5cd01d04c17787b6cc756e0ddb5 (diff) |
Merge pull request #1788 from nextcloud/fix/groups-sort
Properly sort groups
Diffstat (limited to 'src')
-rw-r--r-- | src/views/Contacts.vue | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/views/Contacts.vue b/src/views/Contacts.vue index aedc3b3c..ff3167ba 100644 --- a/src/views/Contacts.vue +++ b/src/views/Contacts.vue @@ -249,6 +249,7 @@ import { VCardTime } from 'ical.js' import download from 'downloadjs' import moment from 'moment' import pLimit from 'p-limit' +import naturalCompare from 'string-natural-compare' import ContactDetails from '../components/ContactDetails' import ContactsList from '../components/ContactsList' @@ -447,7 +448,7 @@ export default { toString: () => group.name, }) }) - menu.sort() + menu.sort((a, b) => naturalCompare(a.toString(), b.toString(), { caseInsensitive: true })) // Find the Recently Contacted group, delete it from array const recentlyIndex = menu.findIndex(group => group.name === GROUP_RECENTLY_CONTACTED) |