vue-excel-editor
vue-excel-editor copied to clipboard
added context (name, pos) to custom sort function params
the params of the custom sort function are only a and b, each containing the whole row object. so no sort implementation is possible, because the right name is not passed. also this.sortDir and this.sortPos are not useable because they are only set after the sort.
if you accept the PR, please also update the documentation to show something like:
... :sort="customSort" ...
{...
customSort(a,b,n,p,name) {
if (a[name] < b[name]) return -1
if (a[name] > b[name]) return 1
return 0
},
...}