Skip to content

Why do collapsed rows remain in the DOM? #714

@mellis481

Description

@mellis481

Collapsed rows (in nested tables) remain in the DOM, but with style={display:none;}. This creates a nasty issue if someone is trying to stripe their table with even-odd CSS rules (which is very common).

Eg. https://table-react-component.vercel.app/demo/expanded-row-render

It seems like the fix would be to add the following to ExpandedRow:

if (!expanded) {
  return null;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions