T
TanStack2mo ago
correct-apricot

Enable sorting on a column level

I am using tanstak to build a table and I want to including sorting on specific columns. What I want to do is disable sorting globally but then enable it at the column level. I have set enableSorting: false in the useReactTable hook which turns off sorting for everything as expected. But when I go enableSorting: true for a column, it doesnt enable the sorting but still uses the tables default. Is there something I am missing or do I have to do it the other was and disable sorting on columns I dont want to sort. Ideally I dont want to do this as there will be more columns disabled than enabled so I would rather enable the ones I want sorted rather
1 Reply
compatible-crimson
compatible-crimson5w ago
I think the global will override the local so you’ll have to do it the way you don’t want to do it.

Did you find this page helpful?