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

Vertical and Horizontal Scrollbars missing from DataTable with border #5407

Open
ugotscott opened this issue Dec 18, 2024 · 2 comments
Open

Comments

@ugotscott
Copy link

ugotscott commented Dec 18, 2024

The behavior changed somewhere between textual==0.85.2 and textual==1.0.0.

textual==0.85.2 looks like:
MyApp_2024-12-17T20_23_32_310033

textual==1.0.0 looks like:
MyApp_2024-12-17T20_31_40_279200

The code to reproduce is:

from textual.app import App, ComposeResult
from textual.widgets import Collapsible, DataTable, Label


class MyApp(App):
    def compose(self) -> ComposeResult:
        yield Collapsible(DataTable(id="t1"), id="c1")
        yield Collapsible(Label("hello"), id="c2")

    def on_mount(self) -> None:
        self.query_one("#c1", Collapsible).styles.max_height = "50%"
        self.query_one("#c2", Collapsible).styles.max_height = "50%"

        t1 = self.query_one("#t1", DataTable)
        t1.styles.border = "heavy", "black"
        t1.add_column("A")
        for number in range(1, 100):
            t1.add_row(" " * 200 + str(number))


if __name__ == "__main__":
    app = MyApp()
    app.run()
Copy link

We found the following entries in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@TomJGooding
Copy link
Contributor

It looks like 8b2f056 is the bad commit. The PR mentions removing a workaround that was thought no longer needed, but perhaps this should be reverted?

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

2 participants