React-table: GlobalFilter not filtering on data subrows

Created on 20 Feb 2020  Â·  7Comments  Â·  Source: tannerlinsley/react-table

Describe the bug
The Global Filter does not filter on data subrows out-of-the-box.

To Reproduce
Steps to reproduce the behavior:

  1. Implement Global Filtering (useGlobalFilter) with manualGlobalFilter = false (default)
  2. Implement Row Expansion (useExpanded)

Expected behavior
The Global Filter, also filters on the subrows of data default out-of-the-box without any custom filtering needed.

Codesandbox!
codesandbox

Desktop:

  • OS: Windows 10
  • Browser: Chrome
  • Version: 80.0.3987.116

Most helpful comment

@tannerlinsley Any update on this? Not working as far as I can see (with latest version) in the provided sandbox. @uqix is right, the filter works only if parent rows match too. If the solution is using flatRows with manual global filter, a CodeSandbox would be cool!

All 7 comments

As far as I know this is working now in your codesandbox with the latest version. Thanks

@tannerlinsley Was this behavior recently corrected? I’m seeing sub-rows failing to global filter using rc16, agnostic of the useExpanded plugin.

To my knowledge yes. But it could be a regression we haven’t tested for.
On Mar 6, 2020, 5:19 PM -0700, Noah Benham notifications@github.com, wrote:

@tannerlinsley Was this behavior recently corrected? I’m seeing sub-rows failing to global filter using rc16, agnostic of the useExpanded plugin.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

@tannerlinsley I'm not seeing this working in my codesandbox.

Steps to reproduce:

  1. Expand a row
  2. Type in the global filter the value of some column of the expanded row
  3. No results are found

@arnoBruynseels useFilters and useGlobalFilter only filter subRows of rows which match the filter first, you can flatten rows to avoid this, FYI , I wrote a filter wrapper

@uqix Would you be so kind to provide a codesandbox example?

Nevermind, I see how it works now, thanks for the information!

@tannerlinsley Any update on this? Not working as far as I can see (with latest version) in the provided sandbox. @uqix is right, the filter works only if parent rows match too. If the solution is using flatRows with manual global filter, a CodeSandbox would be cool!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agray5 picture agray5  Â·  39Comments

larrybotha picture larrybotha  Â·  20Comments

Codar97 picture Codar97  Â·  17Comments

ggascoigne picture ggascoigne  Â·  18Comments

Grsmto picture Grsmto  Â·  100Comments