Added `on_footer_action` handler to manage footer action clicks in `EditEntryScreen`.

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda 2025-07-08 01:20:37 -03:00
parent cc723bdbbb
commit 4f1740f575
1 changed files with 10 additions and 1 deletions

View File

@ -1027,4 +1027,13 @@ class EditEntryScreen(Screen):
# Tab: insert tab
elif self.focused is self.text_entry and event.key == "tab":
self.text_entry.insert('\t')
event.stop()
event.stop()
def on_footer_action(self, event) -> None:
"""Handle clicks on footer actions (Textual 3.x)."""
action = event.action
method = getattr(self, f"action_{action}", None)
if method:
method()
else:
self.notify(f"No action found for: {action}", severity="warning")