-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Given this code:
from textual.app import App, ComposeResult
from textual.widgets import OptionList
class BadScrollBarApp(App[None]):
BINDINGS = [
("space", "nuke")
]
def compose(self) -> ComposeResult:
yield OptionList(*[f"Option {n}" for n in range(500)])
def action_nuke(self) -> None:
self.query_one(OptionList).clear_options()
if __name__ == "__main__":
BadScrollBarApp().run()With textual v3.x, on startup, it looks as you'd expect:
but then after pressing space it looks like this:
note how the widget itself is still the full height of the screen despite OptionList being height: auto; and also note how the scrollbar still seems to think there is the full range of options.
Going back through Textual releases, the last time I see the expected behaviour is with Textual v1.0.0; where after pressing space we see this:
Installing Textual v2.0.0 introduces the problem.
TomJGooding
Metadata
Metadata
Assignees
Labels
No labels


