Table events not always firing #3269
Labels
bug
A crash or error in behavior.
good first issue
Is this your first time contributing? This could be a good place to start!
windows
The issue relates to Microsoft Windows support.
Describe the bug
This may be related to issue 3265, but I thought it better to raise it as a separate report.
Clicking on a table doesn't always fire the table's on_select handler. This arises when I construct and display a list of separate tables. (I've also checked to see whether this arises if the tables aren't elements of a list, and yes, same behaviour.)
events2.py:
I can see this might be considered a bit of an edge case. I've added a few thoughts under "Expected Behavior" below.
Steps to reproduce
Expected behavior
Should the event fire each time?
I can see that eg "Subject Heading 1" was already the selected row in the first table, and might therefore be considered to have not been reselected on the later click. On the other hand, these are table-level events, and by clicking on "Subject Heading 2", haven't we deselected the first table anyway? Certainly, clicking on a different row is treated as reselecting a table and fires the event.
Screenshots
No response
Environment
Logs
Additional context
I already have a workaround on this, but it made me wonder, is there a way to programatically explicitly remove focus/selection from a table or other widget?
The text was updated successfully, but these errors were encountered: