Closed jochenschmich-aeberle closed 1 year ago
The example in https://tanstack.com/table/v8/docs/examples/react/filters should also fully work, when filterFromLeafRows is set to true.
filterFromLeafRows
true
As soon as the first filter value has been entered, the table is still correctly filtered, but the count of faceted unique values reads 0.
0
https://codesandbox.io/p/sandbox/still-waterfall-n82b2q
firstName
All column filter inputs should read "Search... (437)" (where 437 is a valid value)
Every time
No response
Windows, Edge
latest
I think the problem lies here: https://github.com/TanStack/table/blob/main/packages/table-core/src/utils/filterRowsUtils.ts#L65 AFAIK this line should rather read newFilteredFlatRows.push(row) like in the corresponding lines in filterRowModelFromRoot.
newFilteredFlatRows.push(row)
filterRowModelFromRoot
Updated to current version of the code... This could be a quick fix, I suppose...
Describe the bug
The example in https://tanstack.com/table/v8/docs/examples/react/filters should also fully work, when
filterFromLeafRows
is set totrue
.As soon as the first filter value has been entered, the table is still correctly filtered, but the count of faceted unique values reads
0
.Your minimal, reproducible example
https://codesandbox.io/p/sandbox/still-waterfall-n82b2q
Steps to reproduce
firstName
that is so generic, that some rows would still be shown, e.g. "a"Expected behavior
All column filter inputs should read "Search... (437)" (where 437 is a valid value)
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Windows, Edge
react-table version
latest
TypeScript version
No response
Additional context
I think the problem lies here: https://github.com/TanStack/table/blob/main/packages/table-core/src/utils/filterRowsUtils.ts#L65 AFAIK this line should rather read
newFilteredFlatRows.push(row)
like in the corresponding lines infilterRowModelFromRoot
.Terms & Code of Conduct