How to get filtered row count from table ref #5163
Unanswered
mdodge-ecgrow
asked this question in
Q&A
Replies: 2 comments
-
Still fighting with this issue almost exactly a year later if anyone has any ideas. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I did try adding the function 'getFilteredRowCount' to my imperative handle and was able to get a count of filtered rows, but it was always one keystroke behind when searching.
|
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a ref created a couple components up the tree from my actual react-table. I create the ref like this:
const tableRef = useRef<any>(null);
and pass it down like this:<IngredientsTable tableRef={tableRef}
and then in the Table component itself:const Table = forwardRef((props: TableProps, ref) => {
. Now I am trying to figure out how to get the filtered row count up in this grandparent component. I tried something like this:But I am getting the error:
Uncaught TypeError: tableRef.current.getFilteredRowModel is not a function
. Any ideas how this can be done?I should add that I also have this code in the Table component:
And that
console.log
never fires.Beta Was this translation helpful? Give feedback.
All reactions