Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop OptionList.OptionHighlighted leaking out of Select #4280

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading