diff --git a/pyproject.toml b/pyproject.toml index b05687a..7c72174 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "textual-select" -version = "0.3.0" +version = "0.3.1" description = "A select widget (aka dropdown) for Textual." authors = ["Mischa Schindowski "] readme = "README.md" diff --git a/textual_select/_select.py b/textual_select/_select.py index b9e4e90..cbc8f0a 100644 --- a/textual_select/_select.py +++ b/textual_select/_select.py @@ -79,7 +79,9 @@ def __init__( def on_blur(self) -> None: self.select_list.display = False - def on_click(self, event: events.MouseEvent) -> None: + def on_list_item__child_clicked(self, event: ListItem._ChildClicked) -> None: + super().on_list_item__child_clicked(event) + self.select_list.select_highlighted_item() self.select_list.display = False