-
Notifications
You must be signed in to change notification settings - Fork 222
Sorting by multiple columns #309
Comments
+1, kinda in need of this too as of late. @glittershark thoughts about providing the row data when calling the sortFunction? I'm using this for the time being, let me know and I can make a PR. cklab@6b05e0a |
glittershark#309 provide row values to sortFunction
@cklab
|
Is there any update on this? It seems sensible to have fallback sorting, so that if the top-level column sort results in a bunch of rows with equal values, we can have secondary sorting logic for those equal-value rows. |
@cklab Did you use |
@isaachinman I'm using pr #321 which calls sortFunction like so:
So, if we have a sort definition with
sample arguments for sortFunction (with pr #321) would look like:
I then use the objects rowA and rowB to perform further comparisons, as needed. |
- glittershark#309 provide row values to sortFunction - support filtering on all rows - support sorting by columns that do not specify a rowSpan - Specify column when warning about missing data property for TD - allow user to display a custom component when table has no children - glittershark#353 - allow other react components besides Td within Tr - support for components that ultimately resolve to a Td to be rendered in a Tr component - glittershark#84 - colspan support - prevent handleClick prop from making it to rendered component
Is it possible to have a custom sorting function work on multiple columns?
E.g.
If I attempt to sort Col 2, the table sorts by Col 2 and then sorts Col 1 in ascending order.
The text was updated successfully, but these errors were encountered: