Welcome to the React feedback portal. We’re happy you’re here! If you have feedback on how to improve the React, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Within the "SortComparer" function, it is already possible to receive parameters x and y.
sortComparer: (x: ValueType, y: ValueType) => {
// Using the x and y parameters.
},
If the "sortAsc" variable could also be accepted as a parameter, I believe there is no need to create the "sortAsc" local variable.
sortComparer: (x: ValueType, y: ValueType, sortAsc: boolean) => {if (sortAsc && x === null) {
return -1
} else if (sortAsc && y === null) {
return 1
} else if (!sortAsc && x === null) {
return -1
} else if (!sortAsc && y === null) {
return 1
} else {
return x - y
}
},
I would appreciate your consideration of my idea.
sample: