From 37bd0a4f1915ffa73d8106ded5016e801544746e Mon Sep 17 00:00:00 2001 From: Max Rossmannek Date: Fri, 6 Jan 2023 18:31:38 +0100 Subject: [PATCH] fix: ensure prompt is rendered properly upon mounting https://github.com/Textualize/textual/issues/1443#issuecomment-1369584375 --- src/cobib/ui/tui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cobib/ui/tui.py b/src/cobib/ui/tui.py index f514c7d0..4664c546 100644 --- a/src/cobib/ui/tui.py +++ b/src/cobib/ui/tui.py @@ -148,7 +148,7 @@ def on_input_submitted(self, event) -> None: prompt.styles.dock = "bottom" self.mount(prompt) - def action_prompt(self, value) -> None: + async def action_prompt(self, value) -> None: """TODO.""" prompt = Input(value=value) prompt.styles.dock = "bottom" @@ -168,7 +168,7 @@ async def action_submit(*args, **kwargs): prompt.key_escape = key_escape prompt.action_submit = wrap_action_submit(prompt.action_submit) - self.mount(prompt) + await self.mount(prompt) prompt.focus()