mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
added directory tree
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import json
|
||||
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Header, Footer, Tree
|
||||
from textual.widgets import Header, Footer, Tree, DirectoryTree
|
||||
|
||||
|
||||
with open("food.json") as data_file:
|
||||
@@ -23,7 +23,7 @@ class TreeApp(App):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Footer()
|
||||
yield Tree("Root")
|
||||
yield DirectoryTree("../")
|
||||
|
||||
def action_add(self) -> None:
|
||||
tree = self.query_one(Tree)
|
||||
|
||||
Reference in New Issue
Block a user