Browse Source

Don't autoselect with no items.

pull/4533/head
Steven Kirk 6 years ago
parent
commit
c677fb4b4d
  1. 2
      src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

2
src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

@ -631,7 +631,7 @@ namespace Avalonia.Controls.Primitives
/// <param name="e">The event args.</param>
private void OnSelectionModelLostSelection(object sender, EventArgs e)
{
if (AlwaysSelected)
if (AlwaysSelected && Items is object)
{
SelectedIndex = 0;
}

Loading…
Cancel
Save