Unable to deselect row when applied with Filter Column
Steps to Reproduce:

Laptop Info
Looking in to this asap
This will be fixed in the next release.
Hey, I just ran across this myself. Was wondering if a fix was ready on master awaiting a release, or if you still needed someone to fix it.
In node-modules/react-table/dist/index.js, on line number 2869
replace this line
var isSelected = row.isSelected;
with
var isSelected = state.selectedRowIds[row.id];
Hence, getting value of isSelected from the state instead of the row instance
Refer the attached image

I ended up adding a plugin with a useInstance lifecycle that goes between useFilters and useRowSelect. The root cause of this seems to be useFilters generating rows and flatRows arrays that have different objects in them. My plugin just re-generates flatRows from rows before things get passed to useRowSelect.
When is the fix planned to be released? I can still replicate here with the latest version.
Any solution please? As this is really holding us back from using this library and we absolutely can't wait to use it because it's amazing @tannerlinsley Thank you so much.
@ifen Try this: https://gist.github.com/fionawhim/c49fa6cb2257af0a03fb7e09ea1e7583
And use it like this:
return useTable(
{
columns,
data: groupedFeatures,
…
},
useFilters,
useFiltersPatch,
useRowSelect
);
It works by re-creating flatRows so that it’s made of the same objects that are in rows. Note: I haven’t tested this on grouped rows or anything.
This is fixed in master and slated for release. Thanks for your help everyone!
@tannerlinsley I just cloned/built the repo and used yarn link to try out the master branch in my app. I’m still seeing this bug occur: if a filter is active on the table, deselection doesn’t work.
I looked over the code in the repo and I hypothesize that rows and flatRows containing different object instances when there’s a filter is causing the problem.
Good to know. I’ll dig deeper.
On Feb 14, 2020, 2:58 PM -0700, Fiona Hopkins notifications@github.com, wrote:
@tannerlinsley I just cloned/built the repo and used yarn link to try out the master branch in my app. I’m still seeing this bug occur: if a filter is active on the table, deselection doesn’t work.
I looked over the code in the repo and I hypothesize that rows and flatRows containing different object instances when there’s a filter is causing the problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Most helpful comment
This will be fixed in the next release.