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

Header does not follow columns during horizontal scrolling #226

Open
AdamRJensen opened this issue Feb 4, 2024 · 1 comment
Open

Header does not follow columns during horizontal scrolling #226

AdamRJensen opened this issue Feb 4, 2024 · 1 comment

Comments

@AdamRJensen
Copy link

I have created a table using itables that requires scrolling both vertically and horizontally due to the large number of rows and columns. However, when scrolling horizontally, the rows move, but the header does not; consequently, the header is incorrectly aligned with the columns. The video below demonstrates this. Tested this on tables version 1.6.4, 1.6.3, 1.5.0

itables_xscroll_error.mp4

Related to AssessingSolar/solarstations#87

Example code:

    import pandas as pd
    from itables import init_notebook_mode, show
    init_notebook_mode(all_interactive=True)
    
    df = pd.DataFrame(columns=range(100,130), index=range(100))
    
    
    # Show table with stations (all rows)
    show(df, scrollY="700px", scrollCollapse=True, paging=False, classes="display", order=[[0, "asc"]],
         columnDefs=[{"className": "dt-left", "targets": "_all"}])
@AdamRJensen
Copy link
Author

AdamRJensen commented Feb 4, 2024

The problem seems only to appear then using the scrollY argument.

Adding the argument scrollX=True solves the problem, however, it seems like this is still a bug.

I am able to replicate this error in the "Scroll" example in the documentation (when making the browser window very narrow).

image

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

No branches or pull requests

1 participant