mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Fix playerList displayName sorting
This commit is contained in:
@@ -327,7 +327,8 @@
|
|||||||
:label="t('table.playerList.displayName')"
|
:label="t('table.playerList.displayName')"
|
||||||
min-width="140"
|
min-width="140"
|
||||||
prop="displayName"
|
prop="displayName"
|
||||||
:sortable="true">
|
sortable
|
||||||
|
:sort-method="(a, b) => sortAlphabetically(a, b, 'displayName')">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span
|
||||||
v-if="randomUserColours"
|
v-if="randomUserColours"
|
||||||
@@ -509,4 +510,9 @@
|
|||||||
};
|
};
|
||||||
return getValue(b) - getValue(a);
|
return getValue(b) - getValue(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sortAlphabetically(a, b, field) {
|
||||||
|
if (!a[field] || !b[field]) return 0;
|
||||||
|
return a[field].toLowerCase().localeCompare(b[field].toLowerCase());
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user