-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] [iOS] Setting CollectionView.ItemsSource to null after selecting an item crashes #14985
Comments
The crash ultimately happens when the
It seems the easiest solution is to make |
I am having this same issue - any workarounds identified? |
I was having the same problem on ios. Setting the selected item to null before setting the ItemSource to null solved the problem for me. |
I am experiencing the same issue. The only difference is that I am using a library cold Prism. Whenever you dismiss the screen, the Prism library "Destroys" the page by setting its |
Not using Prism, but FreshMVVM. Same issue when the page is dismissed. |
Description
Setting the
ItemsSource
property of aCollectionView
to null while there is a selected item causes an exception to be thrown. This also happens ifItemsSource
is set to null indirectly, in my case I found out while trying to set thePage.BindingContext
to null.Steps to Reproduce
Expected Behavior
The collection view is empty without an error.
Actual Behavior
System.IndexOutOfRangeException
IItemsViewSource is empty
Basic Information
Reproduction Link
https://github.com/GalaxiaGuy/xf-bugs/tree/bug/collectionview-null-binding
The text was updated successfully, but these errors were encountered: