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

pn.widgets.Tabulator with sizing_mode="stretch_width" or max_width results in odd styling issues #7606

Open
kdheepak opened this issue Jan 8, 2025 · 0 comments

Comments

@kdheepak
Copy link
Contributor

kdheepak commented Jan 8, 2025

Try running the following code with panel serve:

import panel as pn
import pandas as pd

pn.extension("tabulator")

df = pd.DataFrame({f"scenario-{i}": [1, 2, 3] for i in range(0, 100)})

layout = pn.widgets.Tabulator(df, max_width=800)

layout.servable()

This causes issues when scrolling left and right:

panel-tabulator-styling-issue.mov

This also causes an issue when using frozen columns. For example, change the line creating a layout to this:

layout = pn.widgets.Tabulator(
    df, max_width=800, frozen_columns=["scenario-1", "scenario-2"]
)

and you'll see this kind of behavior where the frozen columns are not frozen anymore:

panel-tabulator-frozen-columns-issue.mov

ALL software version info

I'm using the latest version of panel:

Image

I made a fresh environment using uv to test this. I've attached the source code with the uv.lock file in the following zip file:

test-panel-tabulator.zip

You can run uv sync and uv run panel serve main.py to reproduce the issue:

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