From 7141c8e34ea3c8ec97daee21f05aa362a793ce09 Mon Sep 17 00:00:00 2001 From: jedi Date: Sun, 29 Dec 2019 12:58:37 +0100 Subject: [PATCH] use more intuitive sorting --- src/components/inputs/InputCombo.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/inputs/InputCombo.vue b/src/components/inputs/InputCombo.vue index 288763f..2dff6bf 100644 --- a/src/components/inputs/InputCombo.vue +++ b/src/components/inputs/InputCombo.vue @@ -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) {