Multiple issues in iOS CollectionView selection synchronization #14535
Labels
area-controls-collectionview
CollectionView, CarouselView, IndicatorView
delighter-sc
platform/iOS 🍎
s/triaged
Issue has been reviewed
t/bug
Something isn't working
t/perf
The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)
Milestone
Description
There are at least three problems in the CollectionView
SelectedItem
/SelectedItems
synchronization in iOS handler code:maui/src/Controls/src/Core/Handlers/Items/iOS/SelectableItemsViewController.cs
Lines 146 to 175 in 9fdfc84
ShouldNotBeSelected
method uses reference equality instead ofEquals
. If the item source returns a different instance of an object then this will fail and deselect items.HashSet
could bring this down to more reasonable logarithmic complexity.SelectedItem
/SelectedItems
which in turns runs the selection synchronization unnecessarily:Steps to Reproduce
TBD
Link to public reproduction project repository
https://github.com/filipnavara/CollectionViewIsBroken
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16.4
Did you find any workaround?
No, short of copying the whole handler code and fixing it myself.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: