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

Fixed expandable content does not work when using enableVirtualization in Table #2208

Merged
merged 76 commits into from
Sep 19, 2024

Conversation

smmr-dn
Copy link
Contributor

@smmr-dn smmr-dn commented Aug 26, 2024

Changes

When enabling virtualization using the virtualizer from @tanstack/react-virtual, expandable content was reported broken since it was originally rendered with each original row, which was completely ignored by the virtualizer. To fix this problem, the expandable content in this PR is moved to a separate component and regenerated its index. The virtualizer now is made aware of the changes in the page size when sub-components are defined. These components are rendered accordingly to their indices associated with which row they are expanded from.

Testing

Confirmed that sub-components are rendered correctly when enableVirtualization is set to true.
virtulization_after

An e2e test is added for expandable contents in virtualized table.

Docs

Added both patch changesets for the bug fix and the removal of WithCSSTransition in sub-components.

After-PR TODOs:

@smmr-dn smmr-dn marked this pull request as ready for review August 27, 2024 18:52
@smmr-dn smmr-dn requested review from a team as code owners August 27, 2024 18:52
@smmr-dn smmr-dn requested review from mayank99 and removed request for a team August 27, 2024 18:52
@mayank99 mayank99 requested review from r100-stack and removed request for a team August 28, 2024 13:31
@smmr-dn smmr-dn requested a review from a team as a code owner August 28, 2024 19:10
@smmr-dn smmr-dn requested review from mayank99 and r100-stack and removed request for a team August 28, 2024 19:10
Copy link
Contributor

@mayank99 mayank99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

r100-stack
r100-stack previously approved these changes Sep 19, 2024
Copy link
Member

@r100-stack r100-stack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@smmr-dn smmr-dn merged commit 42a106c into main Sep 19, 2024
17 of 18 checks passed
@smmr-dn smmr-dn deleted the uyen/virtualization-bug branch September 19, 2024 15:40
@imodeljs-admin imodeljs-admin mentioned this pull request Sep 19, 2024
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.

Table: Expandable content does not work when using enableVirtualization
3 participants