Skip to content

Commit

Permalink
fix(ListView): Update SelectedIndex on selection via container
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Sep 11, 2020
1 parent e59db38 commit 704399b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Uno.UI/UI/Xaml/Controls/ListViewBase/ListViewBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ private void OnSelectedItemsCollectionChanged(object sender, NotifyCollectionCha
{
_modifyingSelectionInternally = true;
SelectedItem = SelectedItems.Where(item => items.Contains(item)).FirstOrDefault();
SelectedIndex = items.IndexOf(SelectedItem);

TryUpdateSelectorItemIsSelected(validRemovals, false);
TryUpdateSelectorItemIsSelected(validAdditions, true);
Expand Down

0 comments on commit 704399b

Please sign in to comment.