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

SelectionList.select doesn't post SelectionToggled message #4400

Closed
TomJGooding opened this issue Apr 7, 2024 · 3 comments
Closed

SelectionList.select doesn't post SelectionToggled message #4400

TomJGooding opened this issue Apr 7, 2024 · 3 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@TomJGooding
Copy link
Contributor

Alright, now I know where I went wrong: When looking into textual's code again I found out that SelectionList.toggle triggers the event while SelectionList.select does not. I only tried out SelectionList.select before :(

Originally posted by @jvllmr in #4397 (reply in thread)

@darrenburns darrenburns self-assigned this Jul 16, 2024
@Textualize Textualize deleted a comment from github-actions bot Jul 16, 2024
@darrenburns
Copy link
Member

Looking at this now.

Spotted a couple of issues relating to the messages in SelectionList, so going to do a pass over it and try to make sure it's posting the right stuff from the various different methods it offers.

@darrenburns darrenburns added bug Something isn't working wontfix This will not be worked on and removed bug Something isn't working labels Jul 16, 2024
@darrenburns
Copy link
Member

I actually believe this is just some lacking documentation.

The semantics of toggle is just that it was explicitly toggled i.e. using the keyboard or a toggle call. The original poster is just handling the wrong event.

I've made the semantics clearer inside docstrings (and also ensured that Toggled messages are sent when toggle_all is used).

Related PR: #4759

Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants