diff --git a/resources/views/components/tomselect.blade.php b/resources/views/components/tomselect.blade.php index 9b71f2b..164da89 100644 --- a/resources/views/components/tomselect.blade.php +++ b/resources/views/components/tomselect.blade.php @@ -22,7 +22,9 @@ field: 'text', direction: 'asc', func: function(a, b) { - return a.text.localeCompare(b.text, undefined, {numeric: true, sensitivity: 'base'}); + const numA = parseInt(a.text, 10); + const numB = parseInt(b.text, 10); + return numA - numB; } }] });