You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Got a Xamarin.Forms CollectionView whose ItemsSource is an ObservableRangeCollection. Items are loaded asynchronously at page appearing. The ViewModel replaces existing items and adds new items to the collection by calling the ReplaceRange. The CollectionView somehow doesn't notice data change and nothing is displayed. Applying one of the following changes does show the items.
Workaround 1: Call ObservableRangeCollection.Clear and afterwards ObservableRangeCollection.AddRange
Workaround 2: Use ObservableCollection, call Clear and add items in a foreach loop using the Add method.
Objective - C exception thrown. Name: NSInternalInconsistencyException Reason: Invalid update: invalid number of items in section 0.The number of items contained in an existing section after the update(13) must be equal to the number of items contained in that section before the update(13), plus or minus the number of items inserted or deleted from that section (13 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section(0 moved in, 0 moved out).
Got a Xamarin.Forms CollectionView whose ItemsSource is an ObservableRangeCollection. Items are loaded asynchronously at page appearing. The ViewModel replaces existing items and adds new items to the collection by calling the ReplaceRange. The CollectionView somehow doesn't notice data change and nothing is displayed. Applying one of the following changes does show the items.
Workaround 1: Call ObservableRangeCollection.Clear and afterwards ObservableRangeCollection.AddRange
Workaround 2: Use ObservableCollection, call Clear and add items in a foreach loop using the Add method.
Reproduction Link:
https://github.com/xamadev/ObservableRangeCollectionError
Tested on iPhone simulator only
Thanks to @jamesmontemagno for the great helperclasses!
The text was updated successfully, but these errors were encountered: