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

feat(Table): add scrollToRowRef prop to the Table component #816

Merged
merged 7 commits into from
Dec 13, 2024

Conversation

stropitek
Copy link
Contributor

Closes: #815

@stropitek stropitek linked an issue Dec 12, 2024 that may be closed by this pull request
Copy link

cloudflare-workers-and-pages bot commented Dec 12, 2024

Deploying react-science with  Cloudflare Pages  Cloudflare Pages

Latest commit: b6f2238
Status: ✅  Deploy successful!
Preview URL: https://4ff3cd38.react-science.pages.dev
Branch Preview URL: https://815-scroll-to-a-row-in-the-t.react-science.pages.dev

View logs

@stropitek
Copy link
Contributor Author

Known issue: there can be an offset the size of the header depending on the value of stickyHeader.

With virtualization, it works as expected with sticky header. Without the sticky header, it can be fixed by passing the scrollMargin option but I'm not sure exposing this option to the component is the right solution.

Without virtualization, it work as expected without the sticky header. scrollIntoView is not taking the sticky header into account (I don't have an answer on why or if it can be fixed).

@stropitek stropitek marked this pull request as ready for review December 12, 2024 09:57
@stropitek
Copy link
Contributor Author

Fixing the issue is not easy. I'd suggest not fixing it right away. If we run into this issue, we can always use the center alignment strategy to mitigate the issue.

@stropitek stropitek requested a review from targos December 12, 2024 09:59
@stropitek stropitek merged commit 49cd819 into main Dec 13, 2024
12 checks passed
@stropitek stropitek deleted the 815-scroll-to-a-row-in-the-table-component branch December 13, 2024 13:39
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.

Scroll to a row in the Table component
2 participants