This repository has been archived by the owner on May 1, 2024. It is now read-only.
[Bug] [iOS] CollectionView blank when bound ObservableCollection has contents rapidly change #13361
Labels
s/needs-info ❓
A question has been asked that requires an answer before work can continue on this issue.
s/needs-repro ❔
This reported issue doesn't include a sample project reproducing the issue. Please provide one.
s/unverified
New report that has yet to be verified
t/bug 🐛
Projects
Description
When a
CollectionView
with a boundObservableCollection
(that has been enhanced to allow bulk changes without overwhelming the UI) has the contents of theObservableCollection
change rapidly (e.g. in response to a filter changing as the user types), theCollectionView
appears to enter a corrupted state where nothing is shown when there are items in theObservableCollection
.The set
EmptyView
continues to function correctly when in the state.Steps to Reproduce
TODO Pending creation of reproduction repo.
Expected Behavior
CollectionView
shows a populatedItemTemplate
in the UI for each item in the boundObservableCollection
.Actual Behavior
CollectionView
shows nothing.Basic Information
Environment
Show/Hide Visual Studio info
Screenshots
TODO Pending creation of reproduction repo.
Reproduction Link
TODO To be created.
Workaround
Reduce rate of changes to
ObservableCollection
(via a queue with items delayed by a timeframe proportional to the change impact, or a throttle/debounce at a higher level if applicable for use case) so that UI has a chance to apply all changes before the next change. This reduces the chance of the race condition that causes this issue from manifesting by a considerable margin (but does not necessarily eliminate the possibility).No quick workarounds here unfortunately, aside from going the slow route (add items one-by-one, slowing the UI considerably when many changes are made).
The text was updated successfully, but these errors were encountered: