sortingFns being forced by type declarations #5172
Unanswered
isMattCoding
asked this question in
General
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.
-
Hello!
I came across a bit of a bizarre behaviour, and would like input as to whether it's worth opening an issue.
I had a table in my project in which I wanted to implement a custom
sortingFn
, but when I went to build my project, the other tables in my project lit up with typescript errors.Error message:
The solution I found was to define
sortingFn: null
in the options ofuseReactTable()
, but I don't like this solution because I don't think I should be required to explicitly define something that isn't used.eg:
It looks like this type declaration is obligatory depending on whether the SortingFns type is used somewhere, I guess?
Beta Was this translation helpful? Give feedback.
All reactions