Replies: 1 comment
-
Closing – as it turns out, the filtering was handled completely by back-end (and the data were being refetched), so it was not an issue with the table itself. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I was assigned to fix a bug in a rather complex table. The issue is that filtering (and sorting) is not working on fields with non-string values. In this specific example, the value is an array of ids that gets mapped to a comma-separated string of localized names. The filtering is done via a simple text input (it would be better to use a multiselect, but the issue still stands).
I know I can use a custom
filterFn
(and I have used it successfully on a side project before). But when I tried to use it here, I ran into a weird issue: thefilterFn
does not seem to run at all (no alerts or console.logs if I'm updating the filter).The code is using the
onColumnFiltersChange
method in a manner that is a little confusing and suspect. I guess the filtering is happening here, because if I commentonColumnFiltersChange
out, all filtering ceases to work.I don't fully understand what the
updater
is doing here and whether (and how) I should passgetFilterFn()
here. I found this reply, but it is even more confusing. Or is the issue somewhere else?Beta Was this translation helpful? Give feedback.
All reactions