Browse Source

add fix for treeview navigation when SelectedItem is not in the tree.

pull/4969/head
Dan Walmsley 6 years ago
parent
commit
22605e52e9
  1. 2
      src/Avalonia.Controls/TreeView.cs

2
src/Avalonia.Controls/TreeView.cs

@ -382,7 +382,7 @@ namespace Avalonia.Controls
ItemContainerGenerator.Index.ContainerFromItem(_selectedItem) :
ItemContainerGenerator.ContainerFromIndex(0);
return (true, result); // SelectedItem may not be in the treeview.
return (result is {}, result); // SelectedItem may not be in the treeview.
}
return (true, null);

Loading…
Cancel
Save