Closed silverliiv closed 1 year ago
@silverliiv , Is this a question about sorting or filtering?
I'm using this "Th" component (attached a screenshot).
I think it's sorting then yes, sorry for the mess.
Hey,
Indeed, values are sorted as strings, "8" > "11"
If it's possible you can cast these string values as numbers with a callback. it would look like this:
<Th
{handler}
orderBy={(row) => Number(row.avg_stack.replace('AVG', ''))}
>
AVG Stack
</Th>
Perfect, solution worked nicely. Thank you.
Hey, first of all thanks for the great package, it has worked out great so far.
But I recently stumbled onto a smallish issue.
I have tables and columns with filtering, and filtering numbers does work from 1-9 but not if it gets higher. For example I have these data rows with values: AVG8, AVG10, AVG11
The filtering works like that: AVG8, AVG11, AVG10 OR AVG10, AVG11, AVG8
Meaning it's only taking into consideration the first part, not the whole number. I also attached some images to understand it better.