natural sort devices by name

meaning, 1-2-10 instead of 1-10-2
This commit is contained in:
Maxi Quoß
2023-02-11 22:08:39 +01:00
parent ef064e9335
commit 376220c557

View File

@@ -1,5 +1,8 @@
export function sortDevices(a, b) {
return a.name > b.name;
return a.name.localeCompare(b.name, undefined, {
numeric: true,
sensitivity: 'base'
});
}
export function sortPorts(a, b) {