Replies: 1 comment 2 replies
-
Did you ever find an alternative solution? I am also frustrated by this, very similar discussion I started a few days ago: #2587 If people have found a solution it'd be a great to see a codesandbox in the docs. I haven't had luck using |
Beta Was this translation helpful? Give feedback.
2 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.
-
Example Sandbox (forked from the kitchen sink demo): https://codesandbox.io/s/react-table-selected-row-data-with-filters-e79c2
I'm having an issue fetching data from my rows when filters are applied.
Recreation (with above example):
selectedRowIds
is an aggregate of all selections (pre and post filter). HoweverselectedFlatRows
are only selected items matching the current filter.In addition, calling
toggleAllRowsSelected(false)
while filtered only clears selections also matching the current filter (and items not within the current filter, but exist inselectedRowIds
remain untouched). Noticed by clicking the "Clear Selections" button below the JSON too.--
I need to be able to access data from selected rows, as well as clear the selections regardless of my current filters. However, it appears all data relating to
rows
(outside of the singleselectedRowIds
state value, are only applicable to currently applied filters.Thoughts on how I might go about this? I can't tell if this is a bug in the library, I'm using the wrong methods, or if something that needs to be custom implemented.
Any help greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions