use more intuitive sorting

This commit is contained in:
j3d1 2019-12-29 12:58:37 +01:00
parent 58ee59ddbc
commit 7141c8e34e

View file

@ -50,7 +50,7 @@ export default {
}),
computed: {
isValid: ({options, nameKey, internalName}) => options.some(e => e[nameKey] == internalName),
sortedOptions: ({options, nameKey}) => options.sort((a, b) => a[nameKey] > b[nameKey]),
sortedOptions: ({options, nameKey}) => options.sort((a, b) => a[nameKey].localeCompare(b[nameKey], 'en', { numeric: true })),
},
watch: {
internalName(newValue, oldValue) {