Ability to add sort ID to columns
Is your feature request related to a problem? Please describe.
When doing server-side sorting, i click a column to sort and get a columnAccessor and a direction. If a column accessor is a nested object, something like publicProvider.state, thats my columnAccessor. However, sorting on the server takes just state or stateCode for what column to sort by. so I have to keep a map on the FE of accessor to columnAccessor to ensure that i send the proper info to the BE for sorting purposes.
Describe the solution you'd like
I'd love to set an id on my column definitions which, if present, is used as the columnAccessor for sorting. This is what TanStack Table does, where it replaces the column accessor with the id if one is provided, so that when you click to sort, the ID is used instead. this allows deeply nested objects to have different IDs for sorting purposes.
Describe alternatives you've considered Creating an object on the FE to map sort clicks and columnAccessor to the ID that the BE needs and onSortStatusChange setting that instead.
Additional context Is there a better way to do this with mantine-datatable and i just haven't found it yet? Would love to hear what the maintainers think the solution to something like this is without keeping a mapping.