forked from TFMM/silent-auction
fix: use explicit numeric parsing for bidder number sorting
This commit is contained in:
@@ -22,7 +22,9 @@
|
|||||||
field: 'text',
|
field: 'text',
|
||||||
direction: 'asc',
|
direction: 'asc',
|
||||||
func: function(a, b) {
|
func: function(a, b) {
|
||||||
return a.text.localeCompare(b.text, undefined, {numeric: true, sensitivity: 'base'});
|
const a_val = a.text.split(' - ')[0];
|
||||||
|
const b_val = b.text.split(' - ')[0];
|
||||||
|
return parseInt(a_val, 10) - parseInt(b_val, 10);
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user