Fix demo so that keyboard navigation scrolls the display again

The `Body` class inherited from `Container` rather than one of the scrolling
containers; until now it had worked because `Widget` provided the bindings
to make this happen, now that they've moved into `ScrollableContainer` that
stopped working.
This commit is contained in:
Dave Pearson
2023-04-20 09:42:29 +01:00
parent fe5f80bdd6
commit 7d82e30684

View File

@@ -14,7 +14,7 @@ from rich.text import Text
from textual.app import App, ComposeResult
from textual.binding import Binding
from textual.containers import Container, Horizontal
from textual.containers import Container, Horizontal, ScrollableContainer
from textual.reactive import reactive
from textual.widgets import (
Button,
@@ -189,7 +189,7 @@ JSON_EXAMPLE = """{
"""
class Body(Container):
class Body(ScrollableContainer):
pass