Skip to content

Conversation

ZPiDER666
Copy link

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.

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.
@ZPiDER666
Copy link
Author

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
   },
...}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant