When calling Focus on another ListView from inside the Select event of a ListView, the 2nd list's Select also gets triggered
See original GitHub issueFrom what I investigated this happens because the first ListView calls it’s Select function but doesn’t return true, so the event keeps propagating.
I was able to fix this by adding a return true after the OnSelect?.Invoke in the ProcessKey function inside SelectableView.cs. I am not sure if this is the correct way to fix this.
public override bool ProcessKey(KeyEvent keyEvent)
{
if (keyEvent.Key == Key.Enter)
{
OnSelect?.Invoke(SelectedItem);
return true;
}
return base.ProcessKey(keyEvent);
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
c# - Trigger Event when listView Item is selected ...
Means that when the Row in the first listView is selected it fills the second listView with the related list like dynamic dropdown...
Read more >ListView (JavaFX 8)
A ListView displays a horizontal or vertical list of items from which the user may select, or with which the user may interact....
Read more >ListView - .NET MAUI
The .NET MAUI ListView displays a scrollable vertical list of selectable data items. ListView supports displaying headers and footers, ...
Read more >ListView Class (System.Windows.Controls)
Represents a control that displays a list of data items.
Read more >ListView | Android Developers
The list allows multiple choices in a modal selection mode. int, CHOICE_MODE_NONE ... This view will get focus only if none of its...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I re-downloaded the project and seems something went wrong on my side the first time (I suspect a file merge).
But the original code is now as @tznind already said above, in the current main. You probably are seeing the NuGet package code. Please, always checkout the current main branch.