Skip to content

Commit

Permalink
Merge pull request #4280 from davep/leaky-select
Browse files Browse the repository at this point in the history
  • Loading branch information
davep authored Mar 11, 2024
2 parents a5bcbc6 + 109b845 commit f2dc11c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Rename `CollapsibleTitle.action_toggle` to `action_toggle_collapsible` to fix clash with `DOMNode.action_toggle` https://github.com/Textualize/textual/pull/4221
- Markdown component classes weren't refreshed when watching for CSS https://github.com/Textualize/textual/issues/3464
- Rename `Switch.action_toggle` to `action_toggle_switch` to fix clash with `DOMNode.action_toggle` https://github.com/Textualize/textual/issues/4262
- Fixed `OptionList.OptionHighlighted` leaking out of `Select` https://github.com/Textualize/textual/issues/4224

### Changed

Expand Down
6 changes: 6 additions & 0 deletions src/textual/widgets/_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ def on_option_list_option_selected(self, event: OptionList.OptionSelected) -> No
event.stop()
self.post_message(self.UpdateSelection(event.option_index))

def on_option_list_option_highlighted(
self, event: OptionList.OptionHighlighted
) -> None:
"""Stop option list highlighted messages leaking."""
event.stop()


class SelectCurrent(Horizontal):
"""Displays the currently selected option."""
Expand Down

0 comments on commit f2dc11c

Please sign in to comment.