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
Header scrolls horizontally but body doesn't follow with header scroll #2143
Comments
I have found a solution that works for me: I listen to a scroll event on the header element and reset the scroll position to the beginning. Additionally, I listen to a focus event from the header element and scroll the table body to it.
I have added a fixed example to StackBlitz, but it is not working well, and I don't have time to figure out why at the moment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm submitting a ... (check one with "x")
Current behavior
The entire header row scrolls horizontally, but the body scroll does not change.
Expected behavior
The entire header row and body should scroll horizontally together.
Reproduction of the problem
See example in stackblitz editor or app
I have examined the source code of ngx-datatable and found that there is no header-to-body scrolling synchronization, only body-to-header scrolling. I attempted to listen to the header scroll event and recalculate the table dimensions but was not successful.
What is the motivation / use case for changing the behavior?
The motivation for changing the behavior is to allow for the addition of inputs and other elements to the header for expanding table functionality.
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: