Datable sorting + AJAX call #15162
Unanswered
timothydilbert
asked this question in
Help
Replies: 0 comments 1 reply
-
I've wanted to be able to do that too, but I've concluded that the DataTable component simply doesn't support it. I suppose you could attach your own click event listener on the table headings and probably examine a class name on the element when it's clicked to determine the sort direction. But you might be better off just creating your own DataTable component that works how you need it to. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a use case involving the DataTable component with sorting enabled. When the user attempts to sort the table via the table header, I want to trigger an AJAX call.
I'm able to capture on the
onClick
event, but figuring out whether I should be sorting ASC or DESC is difficult. And, thesortRow
does not trigger for me. And, even if it did, it appears to be client-side ordering, which doesn't work for my use case.I'm really just looking for an
onClick
event that includes the sort status (e.g.arrow--up
orarrow--down
). Is this possible, and how do I do that?Beta Was this translation helpful? Give feedback.
All reactions