Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Dont mount table row component of detail panel when not expanded #498

Closed
wants to merge 2 commits into from

Conversation

EdwardEB
Copy link
Contributor

@EdwardEB EdwardEB commented Mar 6, 2025

Previously, table row component would mount even if detail row is not expanded. This can cause the DOM to bloat rapidly.
A grid with 100 rows and a detail panel would create 100 extra DOM nodes.

Also fixed all detail panel stories.

Copy link

vercel bot commented Mar 6, 2025

@EdwardEB is attempting to deploy a commit to the Kevin Vandy OSS Team on Vercel.

A member of the Team first needs to authorize it.

@rommelmamedov
Copy link

Currently, I'm using this setup to solve the issue:

Basically, passing this prop to useMantineReactTable:

renderDetailPanel: detailPanel ? ({ row }) => (row.getIsExpanded() ? detailPanel?.(row) : null) : undefined,

@KevinVandy
Copy link
Owner

This was done on purpose to avoid issues with both virtualization and striped row css

@EdwardEB EdwardEB closed this Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants