-
Have found a few answers on getting the data as it is displayed using the older versions of this library like https://stackoverflow.com/questions/48120858/access-filtered-data-in-reacttable but I can't figure out how to in the new version. Tried accessing Looking at the instance props, I can't find one that will show me the data as it is displayed https://react-table.js.org/api/useTable#instance-properties |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Just kidding, |
Beta Was this translation helpful? Give feedback.
-
Extract 'rows' from the destructured values and that will give you all the row data that has been filtered const {
getTableProps,
headerGroups,
prepareRow,
page,
gotoPage,
setPageSize,
rows, // <-------------
state: { pageIndex, pageSize, filters }
} = useTable(
{ data, columns, autoResetHiddenColumns: false },
useFilters,
useGlobalFilter,
useSortBy,
usePagination,
useRowSelect
); |
Beta Was this translation helpful? Give feedback.
Just kidding,
rows
is all I need