mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user