Changed parameters of sort method of Table
This commit is contained in:
parent
e49f796318
commit
da020a63ee
2 changed files with 10 additions and 2 deletions
|
@ -436,7 +436,7 @@
|
|||
const key = this.cloneColumns[index].key;
|
||||
data.sort((a, b) => {
|
||||
if (this.cloneColumns[index].sortMethod) {
|
||||
return this.cloneColumns[index].sortMethod(a, b);
|
||||
return this.cloneColumns[index].sortMethod(a[key], b[key], type);
|
||||
} else {
|
||||
if (type === 'asc') {
|
||||
return a[key] > b[key] ? 1 : -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue