Skip to content

Commit

Permalink
Merge pull request #12 from UmBsublime/textual_v0.14.0_compat
Browse files Browse the repository at this point in the history
Textual v0.14.0 compat
  • Loading branch information
darrenburns authored Mar 27, 2023
2 parents 9943994 + b7e676d commit 7dcd737
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ packages = [{ include = "textual_autocomplete" }]
[tool.poetry.dependencies]
python = "^3.7.8"
#textual = {path="../textual", develop=true}
textual = "^0.11.0"
textual = ">=0.14.0"
typing-extensions = "^4.5.0"

[tool.poetry.group.dev.dependencies]
mypy = "^0.991"
black = "^22.10.0"
#textual = { version = "^0.10.0", extras = ["dev"] }
textual = { version = "^0.11.0", extras = ["dev"] }
textual = { version = ">=0.14.0", extras = ["dev"] }
ward = { version = "^0.67.2b0", allow-prereleases = true }

[build-system]
Expand Down
10 changes: 5 additions & 5 deletions textual_autocomplete/_autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,13 @@ def _select_item(self):
self.input.cursor_position = new_state.cursor_position

self.dropdown.display = False
self.post_message_no_wait(
self.Selected(self, item=self.dropdown.selected_item)
self.post_message(
self.Selected(item=self.dropdown.selected_item)
)

class Selected(Message):
def __init__(self, sender: MessageTarget, item: DropdownItem):
super().__init__(sender)
def __init__(self, item: DropdownItem):
super().__init__()
self.item = item


Expand All @@ -264,7 +264,7 @@ class Dropdown(Widget):
}
Dropdown .autocomplete--selection-cursor {
background: $boost 8%;
background: $boost;
}
"""

Expand Down

0 comments on commit 7dcd737

Please sign in to comment.