fix(example): show state in bottom title

This commit is contained in:
EdJoPaTo
2024-02-22 19:41:23 +01:00
parent 8806c105ec
commit ed9d91f58c
+5 -1
View File
@@ -120,7 +120,11 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Result<(
let area = frame.size();
let widget = Tree::new(app.items.clone())
.expect("all item identifiers are unique")
.block(Block::bordered().title(format!("Tree Widget {:?}", app.state)))
.block(
Block::bordered()
.title("Tree Widget")
.title_bottom(format!("{:?}", app.state)),
)
.scrollbar_margin(Margin::new(0, 1))
.scrollbar(Some(
Scrollbar::new(ScrollbarOrientation::VerticalRight)