Replies: 3 comments
-
Any updates on this? I'm trying to do something similar. |
Beta Was this translation helpful? Give feedback.
-
Your custom // from useSortBy.js
if (column.canSort) {
column.toggleSortBy = (desc, multi) => {
toggleSortBy(column.id, desc, multi);
};
... @tannerlinsley probably forgot to include Fastest way to workaround this problem is to introduce new callbacks like if (column.canSort) {
column.toggleSortBy = (desc, multi) => {
if (column.toggleSortByCustom)
column.toggleSortByCustom(desc, multi);
toggleSortBy(column.id, desc, multi);
};
... If modifying BTW - this is a great library. |
Beta Was this translation helpful? Give feedback.
-
@tyre : do you have an example for using manualFilters? I am trying to filter via server-side.. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Might be doing this incorrectly, so bear with me.
I'm using react-table to manage data fetched from a server. The pagination, ordering, and filters are all happening serverside.
Here is my table instance:
Here is one example column definition with a custom
toggleSortBy
(in the future those will set controlled state to then re-fetch data but for now they log and throw):and here is the header definition:
When clicking the headers, the custom
toggleSortBy
is not called; nothing is logged nor thrown. From what I could gather from the docs and also the function definition of thetoggleSortBy
function on thecolumn
itself, this should call my defined function.Have I misunderstood the docs or is this a bug?
Beta Was this translation helpful? Give feedback.
All reactions