vue3-datatable is a powerful component for creating dynamic and customizable data tables. It supports large amounts of data, sorting, pagination, and filtering and highly customizable
Option numeric to true in Intl.Collator options is the origin of the problem. Initialize this to false change the sort order to the expected result.
It may be better to set this option to true only when column.type === 'number'
// sort rows
var collator = new Intl.Collator(undefined, {
numeric: props.columns.find(col => col.field == currentSortColumn.value)?.type === 'number',
sensitivity: 'base',
});
Hello,
I am using this plugin and notice some problems on sorting.
Here is an example :
The problem come from the sort function inside filteredRows function :
Option numeric to true in Intl.Collator options is the origin of the problem. Initialize this to false change the sort order to the expected result. It may be better to set this option to true only when column.type === 'number'
Regards.