Hi there! First of all thanks for all your efforts in creating such a great component. However I did encounter a rather strange issue.Briefly, when I use a custom function for sorting, the results are sorted for one direction only. The second direction restores the unsorted order of rows.
Here is a small example.
In chrom/edge it performs only the descending sorting, in firefox - ascending. Am I missing something?
Thanks and best regards,
Vlad
Hi @vigor-vlad, first of all, thank you very much for sharing your code, it helped me to solve mine.
In order to fix yours, your comparison function has to return one of the three possible values:
Negative (if B is bigger than A)
Zero (if A and B are equal)
Positive (if A is bigger than B)
For more info, see the 'Parameter Values' section in this page:
https://www.w3schools.com/jsref/jsref_sort.asp
@Hillelman Thanks!
Most helpful comment
@Hillelman Thanks!