Sorting issue #2679
Unanswered
denisjovic
asked this question in
General
Sorting issue
#2679
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am new to both React and react-table and I am trying to implement simple alphabetical sorting on one of my columns but can't figure it out. I of course added useSortBy as seen in docs/examples, but it just kind of reverses the table up and down and that's all, elements don't actually get sorted. In all the examples I saw, it seems that 'alphanumeric' should be default sort type.
I checked the docs and I believe this is the part I need to implement, but I am confused on how to apply it.
sortType: String | Function(rowA: , rowB: , columnId: String, desc: Bool)
If my Columns look something like this, where should I add the sortType?
I tried this, but nothing happens.
Does anyone had similar issue or has an idea of how to approach this? Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions