This repository has been archived by the owner on May 1, 2024. It is now read-only.
iOS bug view not updating correctly when Collection View is bound to an Observable Range Collection and visibility of view is set to true once collection loads #13760
Labels
Description
This issue only exists on iOS and isn't an issue for Android.
Note -- There are a couple of different scenarios illustrating that it's not just one thing that is causing the issue.
The issue is with the View updating correctly when it's visibility is initially set to false in the constructor, then once the CollectionViews item source that is bound to an ObservableRangeCollection is populated and the Views visibility is set back to true, the CollectionViews items are not drawn to the view -- With this scenario, it's only an issue when the ObservableRangeCollection is directly being assigned e.g. Results = new ObservableRangeCollection(await GetData1()); -- However using below technique to populate the ObservableRangeCollection isn't an issue Results.AddRange(await GetData2());.
I have provided a project that replicates the issue and can be downloaded from https://github.com/krmWorkAccnt/iOSBugWithViewUpdatingAfterLoading
When the project loads, it's setup to show the issue with iOS -- To show it's a combination of events causing the issue, comment out the visibility setting in the constructor of the MainViewModel and populating the CollectionView using GetResults1() works correclty.
Steps to Reproduce
Expected Behavior
iOS view draws correctly once the collection views item source has been updated and visibility is set back to true
Actual Behavior
iOS view isn't correctly redrawing once collection views item source is updated and visibility is set back to true
Basic Information
iOS devices regardless of iOS version
Environment
Show/Hide Visual Studio info
Build Logs
Screenshots
Reproduction Link
https://github.com/krmWorkAccnt/iOSBugWithViewUpdatingAfterLoading
Workaround
using AddRange to populate an ObservableRangeCollection that is bound to a collectionView
The text was updated successfully, but these errors were encountered: