Skip to content

Commit

Permalink
fix: incorrect behavior sorting tables with numeric values
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Oct 18, 2024
1 parent dba490f commit 60e1e59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/WorkspaceTabQueryTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ const sortedResults = computed(() => {
valA = typeof valA === 'string' ? valA.toLowerCase() : valA;
valB = typeof valB === 'string' ? valB.toLowerCase() : valB;
if (!isNaN(valA)) valA = String(Number(valA));
if (!isNaN(valB)) valB = String(Number(valB));
if (typeof valA !== 'number' && !isNaN(valA)) valA = String(Number(valA));
if (typeof valB !== 'number' && !isNaN(valB)) valB = String(Number(valB));
if (valA < valB) return -1 * modifier;
if (valA > valB) return 1 * modifier;
Expand Down

0 comments on commit 60e1e59

Please sign in to comment.