Skip to content

Commit

Permalink
Recycle the focused element on NotifyCollectionChangedAction.Reset
Browse files Browse the repository at this point in the history
  • Loading branch information
danipen committed Sep 10, 2024
1 parent e7f8943 commit a4bacae
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,8 @@ void ClearFocusedElement(int index, int count)
break;
case NotifyCollectionChangedAction.Reset:
_realizedElements.ItemsReset(_recycleElementOnItemRemoved);
if (_focusedElement is not null )
RecycleElementOnItemRemoved(_focusedElement);
break;
}
}
Expand Down

0 comments on commit a4bacae

Please sign in to comment.