Describe the bug
When trying to use the return value of column.getSortByToggleProps as an argument to column.getHeadProps(), a Type error occurs stating that column.getSortByToggleProps is not a function
Expected behavior
The function should be a property of column, since it is being used in some of the examples.
Screenshots

Desktop (please complete the following information):
@tannerlinsley - I would love to understand what the issue is.
Hmm. I can't reproduce this error. Can you please send me a codesandbox as an example?
Unfortunately I cannot. The code is proprietary and to take a small chunk out wouldn’t work because the code relies on other things in our repo.
On Aug 28, 2019, at 11:52 AM, Tanner Linsley notifications@github.com wrote:
Hmm. I can't reproduce this error. Can you please send me a codesandbox as an example?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I would focus then on not using any of your code and just tweaking one of the examples in codesandbox to demonstrate the bug. If I can't reproduce it, then I don't know how to fix it.
Closing this for triage. Please reopen a new issue if/when you have more information on how to replicate the problem.
Thanks!
Hey Tanner, I figured out the issue. I wasn't included the useSortBy inside of the useTable hook.
I know this is old, however I am getting the exact same error and I have actually included the useSortBy inside of the useTable hook.
I get "Property 'getSortByToggleProps' does not exist on type 'HeaderGroup
This prop remains hidden even after having used the useSortBy hook. Is there a solution for this.

I ran into the same issue but noticed that I had simply misplaced useSortBy in the useTable parameters like this
javascript
useTable(
{
columns,
data,
useSortBy, // 🚨 useSortBy inside the options object will lead to "Property 'getSortByToggleProps' does not exist on type 'HeaderGroup'"
}
);
But it should be like this
javascript
useTable(
{
columns,
data,
}
useSortBy, // ✅ useSortBy placed after the options object
);
Hope this helps.
Most helpful comment
Hey Tanner, I figured out the issue. I wasn't included the useSortBy inside of the useTable hook.