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

Virtualized table with parent ref #3993

Merged
merged 3 commits into from
Jun 15, 2023
Merged

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Jun 15, 2023

About the changes

  • virtualized table works with explicit parent ref now
  • we default to window if parent ref is not provided
  • using new capability in the new playground
  • tested feature toggle list if it still works and also tested new playground results in a popover

Important files

Discussion points

@vercel
Copy link

vercel bot commented Jun 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2023 11:45am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Jun 15, 2023 11:45am

Math.floor(window.pageYOffset / rowHeight)
Math.floor(
(parent instanceof HTMLElement
? parent.scrollTop
Copy link
Contributor Author

Choose a reason for hiding this comment

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

HTMLElements don't have pageYOffset but scrollTop

prepareRow={prepareRow}
/>
<Box
ref={parentRef}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

you pass the same ref to your scrollable parent

}}
>
<VirtualizedTable
parentRef={parentRef}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

and to your virtualized table

@kwasniew kwasniew merged commit c7ff3b4 into main Jun 15, 2023
17 checks passed
@kwasniew kwasniew deleted the virtualized-table-with-parent-ref branch June 15, 2023 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants