Closed a-bali closed 4 months ago
Sorry, my bad, the sorting of course was not based on the formatted value, but the column was interpreted as string instead of number. The following solved it:
<Th {handler} orderBy={(row) => parseInt(row.byt)}>bytes</Th>
Thanks for the update 👍
I'm trying to display data where one of the columns has storage in bytes. I'm formatting this to be human readable with a function, however now datatables sorts this column by the formatted value, not the raw data. Can you help me how to make the sorting work based on the raw data instead?
Relevant code is as follows: