Open YZahringer opened 4 years ago
@YZahringer Thanks for the reproduction sample. I have done several tests and can reproduce the issue using 4.6 and 4.7-pre2.
Then, I have created a tests in Xamarin.Forms Core Gallery using the MvvmHelpers ObservableRangeCollection
code and, cannot reproduce the issue:
https://gist.github.com/jsuarezruiz/bbed609b8382a72c6304c4244f48b964
I will check if it has been fixed by another issue fix, etc.
@jsuarezruiz Thank you for the answer. In the test there is no ItemTemplate
defined, perhaps without it does not reproduce the problem?
You are right. Using strings I didn't notice the ItemTemplate
in your example.
So, using ItemTemplate
, can reproduce in Core Gallery too.
Any news on this? We’re using ObservableRangeCollection for a reason...
any plans on when this will get fixed? This is a pretty critical blocker for me at the moment.
Repro project updated to XF 4.8.0.1269 (issue persist)
Repro project updated to XF 5.0.0.1829-pre6
(issue persist).
I also added and tried with new XCT ObservableRangeCollection, same problem.
Also interested in this issue progress. Use latest XF 5.0.0.2012
and reverse still there (actually on refresh, initial AddRange work normal). I also use XCT ObservableRangeCollection.
Update: But when I changed collection update from
MyCollection.Clear()
MyCollection.AddRange(NewCollection)
to
MyCollection.ReplaceRange(NewCollection)
this issue disappeared. In case somebody look for workaround...
.NET MAUI related issue #6471
Description
Using the
AddRange
method to optimize the insert of elements in anObservableCollection
binded toCollectionView
adds them in reverse order.I've tried with two different implementations of
Range ObservableCollection
, same issue:Expected Behavior
Items are added in order with
AddRange
.Actual Behavior
Items are added and removed in reverse order.
Basic Information
Screenshots
With multiple
Add
onObservableCollection
With
AddRange
onObservableCollection
(items are added in reverse order and remove it in reverse order as well)
Reproduction Link
CollectionView AddRange sample