Add documentation of full table instance variables including state for each hook #2735
Unanswered
CaitlinWeb-st
asked this question in
Ideas
Replies: 1 comment
-
Feel free to PR for the same :) |
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.
-
version: 7.5.0
While working on some "advanced" functionality for tables that use
react-table
and looking at the documentation it isn't obvious that you can manipulate the state for the hooks. (Maybe this isn't the case with all of them.)Specifically for
useSortBy
, the Instance Properties are described in documentation as only these things:rows
preSortedRows
toggleSortBy
There's no mention of:
setSortBy
state: { sortBy }
My use-case involved saving the sort options to localStorage, so I wanted to be able to use or set the sort's state (within a
useEffect
). It wasn't obvious that was possible until I looked through everything returned byuseTable
.Could the documentation be updated with the additional instance variables that
useTable
includes with each of the hooks?Beta Was this translation helpful? Give feedback.
All reactions