Hidden ListItem in ListView is selected when navigating with keyboard #4261
-
When a ListView contains ListItems with display = False the items are still selected when navigating ListView with keyboard. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
As it stands, Moreover, even if it did, the code in the MRE wouldn't do the job anyway as you're hiding the It is worth noting, however, that As an unrelated PS: with Footer():
yield Label("Use arrow keys to navigate. Hidden items are still selected") this isn't really the intended use for |
Beta Was this translation helpful? Give feedback.
-
I have updated the MRE to correctly hide the list item and not the label. |
Beta Was this translation helpful? Give feedback.
As I mentioned above: to best of my knowledge
ListItem
wasn't designed as a widget that could have hidden content; it isn't intended as a general container1.Disable and hide seems like a reasonable approach at the moment.
Footnotes
That's not to suggest that it shouldn't be changed to do so, I'm just pointing out how it works at the moment. ↩