mirror of
https://github.com/Fabio286/antares.git
synced 2025-04-24 14:58:41 +02:00
fix: incorrect behavior sorting tables with numeric values
This commit is contained in:
parent
dba490f226
commit
60e1e59505
@ -378,8 +378,8 @@ const sortedResults = computed(() => {
|
|||||||
valA = typeof valA === 'string' ? valA.toLowerCase() : valA;
|
valA = typeof valA === 'string' ? valA.toLowerCase() : valA;
|
||||||
valB = typeof valB === 'string' ? valB.toLowerCase() : valB;
|
valB = typeof valB === 'string' ? valB.toLowerCase() : valB;
|
||||||
|
|
||||||
if (!isNaN(valA)) valA = String(Number(valA));
|
if (typeof valA !== 'number' && !isNaN(valA)) valA = String(Number(valA));
|
||||||
if (!isNaN(valB)) valB = String(Number(valB));
|
if (typeof valB !== 'number' && !isNaN(valB)) valB = String(Number(valB));
|
||||||
|
|
||||||
if (valA < valB) return -1 * modifier;
|
if (valA < valB) return -1 * modifier;
|
||||||
if (valA > valB) return 1 * modifier;
|
if (valA > valB) return 1 * modifier;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user