You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If target values are null or undefined, sorting becomes corrupt.
I have cloned your project and fixed it so it fits my use-case, where some values in rows might be null or undefined.
I just implemented a compare function as follows:
static compare(a: any, b: any ) {
if(a == null && b == null) return 0;
if(a != null && b == null) return -1;
if(a == null && b != null) return 1
return a > b ? 1 : -1;
}
And replaced some of the logic.
I also created som more tests to verify it.
Would you be intressted in me making a pull request?
The text was updated successfully, but these errors were encountered:
If target values are null or undefined, sorting becomes corrupt.
I have cloned your project and fixed it so it fits my use-case, where some values in rows might be null or undefined.
I just implemented a compare function as follows:
static compare(a: any, b: any ) {
if(a == null && b == null) return 0;
if(a != null && b == null) return -1;
if(a == null && b != null) return 1
return a > b ? 1 : -1;
}
And replaced some of the logic.
I also created som more tests to verify it.
Would you be intressted in me making a pull request?
The text was updated successfully, but these errors were encountered: