Skip to content

Commit

Permalink
Order groups alphabetically in contact details dropdown (nextcloud#2051)
Browse files Browse the repository at this point in the history
Signed-off-by: Harry Youd <harry@harryyoud.co.uk>
  • Loading branch information
harryyoud committed Feb 21, 2021
1 parent a018067 commit 42ad401
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Properties/PropertyGroups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import debounce from 'debounce'
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
import Contact from '../../models/contact'
import PropertyTitle from './PropertyTitle'
import naturalCompare from 'string-natural-compare'

export default {
name: 'PropertyGroups',
Expand Down Expand Up @@ -104,6 +105,7 @@ export default {
computed: {
groups() {
return this.$store.getters.getGroups.slice(0).map(group => group.name)
.sort((a, b) => naturalCompare(a, b, { caseInsensitive: true }))
},

/**
Expand Down

0 comments on commit 42ad401

Please sign in to comment.