I want to make a custom sort method for a column in my ReactTable. How can I say to ReactTable that it should use my custom sort method instead?
I can not see how I am supposed to use sortMethod property on the column. When I pass this:
sortMethod: (prop1, prop2, prop3) => console.log(prop1, prop2, prop3); //undefined undefined false
So I guess that the prop3
says false because it is not desc. However, what about the prop1
and prop2
? should it not be something? One reason can be that I only have an id
on the column, and no accessor
?
React-table returns undefined for props1 and props2 due to unavailability of accessor key in column props.
https://www.npmjs.com/package/react-table#columns
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With