Skip to content

Commit 5b64473

Browse files
authored
Merge pull request #36 from pkendall64/master
Sort vendors/targets lists
2 parents 0e0008a + d1eea96 commit 5b64473

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/pages/BackpackHardwareSelect.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ watchPostEffect(() => {
5757
let hasTargets = v.hasOwnProperty(store.targetType);
5858
if (hasTargets && v.name) vendors.value.push({title: v.name, value: k})
5959
}
60+
vendors.value.sort((a, b) => a.title.localeCompare(b.title))
6061
}).catch((_ignore) => {
6162
})
6263
}
@@ -74,6 +75,7 @@ watchEffect(() => {
7475
}
7576
}
7677
}
78+
targets.value.sort((a, b) => a.title.localeCompare(b.title))
7779
if (targets.value.length === 1) {
7880
store.target = targets.value[0].value
7981
keepTarget = true

src/pages/MainHardwareSelect.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ watchPostEffect(() => {
6161
Object.keys(v).forEach(type => hasTargets |= type.startsWith(store.targetType))
6262
if (hasTargets && v.name) vendors.value.push({title: v.name, value: k})
6363
}
64+
vendors.value.sort((a, b) => a.title.localeCompare(b.title))
6465
}).catch((_ignore) => {
6566
})
6667
}
@@ -111,6 +112,7 @@ watchPostEffect(() => {
111112
}
112113
}
113114
}
115+
targets.value.sort((a, b) => a.title.localeCompare(b.title))
114116
if (!keepTarget) store.target = null
115117
})
116118

0 commit comments

Comments
 (0)