-
Notifications
You must be signed in to change notification settings - Fork 1.9k
CollectionView not being able to remove selected item highlight on iOS #30363
Copy link
Copy link
Closed
Copy link
Labels
area-controls-collectionviewCollectionView, CarouselView, IndicatorViewCollectionView, CarouselView, IndicatorViewcollectionview-cv2i/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/iosregressed-in-9.0.40s/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-controls-collectionviewCollectionView, CarouselView, IndicatorViewCollectionView, CarouselView, IndicatorViewcollectionview-cv2i/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/iosregressed-in-9.0.40s/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
A common (the most common?) scenario for CollectionView is to have a list of items. Clicking an item will do some action (navigate, show dialog, etc). Ideally there is an animation that appears to indicate that you have touched a row, and then that animation disappears. In the past (XF) we would set the
SelectedItemof theCollectionViewto null when it was set. However this is not working currently.When setting
SelectedItemback to null the item is staying selected on iOS. On Android the item selected state is not showing. It does not appear that there is a good way to get a row touch animation with out of the box CollectionView.A way I did try to achieve this was with CommunityToolkit.Maui and its
TouchBehavior, however that lead to another bug of TouchBehaviour in CollectionView2 stops working after Push/Pop of page.I am unsure if there is a possible way to achieve this at all. Considering how important CollectionViews are, both of these bugs are degrading the visual impact of apps using MAUI.
This problem impacts both out of the box CollectionView and those using
CollectionViewHandler2.This problem persists if you use bind to
SelectedItem(seeMainPage.xmlandMainPageModel.cs) instead of theSelectionChangedevent.Adding a
await Task.Delaybetween getting the selection and setting the selection to null will give the correct behavior. However this delays everything else you want to do. Also because you are taking a guess at the duration to wait it may not work for all scenarios.Steps to Reproduce
Both projects are doing different behaviors.
Link to public reproduction project repository
https://github.com/beeradmoore/maui-issue-CollectionViewSelectedItemBug
Version with bug
9.0.81 SR8.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
iOS 18.5, Android 15
Did you find any workaround?
Only current workaround is to not use any animations on selecting rows in a CollectionView.
Relevant log output