question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When we use `useExpanded` and `useFilters` subRows disappear when we perform a search

See original GitHub issue

Describe the bug (required) When using useExpanded and useFilters subRows disappear when we perform a search.

Provide an example via Codesandbox! (required) https://codesandbox.io/s/expander-filtering-gjer7

Steps To Reproduce (required) This happens with all filters, bellow an example:

Search for the exact content of a row from “First Name”:

Issue 1: The search doesn’t looks for values on subRows Issue 2: When you clear the search the subRows disappear

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:28 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
govi74commented, May 3, 2020

Well , when you explicitly define the subrows , at least the subrows are not getting removed. But my problem now is, global filter is not searching the subrows.

useTable(
    {
      columns,
      data,
      initialState: {
        hiddenColumns: hiddenColumns,
      },
      getSubRows: (row: any) => row.subRows,
    },
7reactions
ColinLightscommented, Jun 7, 2021

Its funny how this small fixable issue made me change library, not even a workaround was provided

Read more comments on GitHub >

github_iconTop Results From Across the Web

When we use `useExpanded` and `useFilters` subRows ...
Describe the bug (required) When using useExpanded and useFilters subRows disappear when we perform a search.
Read more >
API Reference: useExpanded | React Table - TanStack
useExpanded is the hook that implements row expanding. It is most often used with useGroupBy to expand grouped rows or on its own...
Read more >
Typescript taking in Javascript component; How to solve ...
Update based on answer. Using the new allow JS, i still am receiving a similar error as below, Type '{ columns: MutableRefObject< ...
Read more >
React Table: A complete tutorial with examples
In this tutorial, we'll show you how to build a smart React data table UI with basic sorting and searching functionalities using react-table ......
Read more >
Working on React Table v7's API - YouTube
Join me as I polish up some of React Table's API in preperation for a v7 beta release!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found