forked from TFMM/silent-auction
fix: use numeric sorting for tomselect dropdowns
This commit is contained in:
@@ -18,10 +18,13 @@
|
|||||||
copyClassesToDropdown: false,
|
copyClassesToDropdown: false,
|
||||||
dropdownParent: 'body',
|
dropdownParent: 'body',
|
||||||
controlInput: '<input>',
|
controlInput: '<input>',
|
||||||
sortField: {
|
sortField: [{
|
||||||
field: 'text',
|
field: 'text',
|
||||||
direction: 'asc'
|
direction: 'asc',
|
||||||
}
|
func: function(a, b) {
|
||||||
|
return a.text.localeCompare(b.text, undefined, {numeric: true, sensitivity: 'base'});
|
||||||
|
}
|
||||||
|
}]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user