SwipeView in CollectionView misses binding when deleting an item after swiping open multiple items #21958
Labels
area-controls-collectionview
CollectionView, CarouselView, IndicatorView
platform/android 🤖
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
SwipeView is typically used inside a CollectionView to provide an option to delete a collection view item (e.g. by revealing a trash can icon swipe item and using Command binding to remove the corresponding item when clicked). When multiple items of the collection view are swipe open, deleting any of the swiped items different from the bottom one causes a refresh of the CollectionView with unexpected side effects: this refresh is not supposed to alter in any way the SwipeView open state of the other collection view items (which should stay open), but in fact the SwipeView of all items following the deleted one is getting closed. Deleting further items later on will present other erratic behavior like e.g. some SwipeViews will show open again but on unexpected CollectionView items.
Steps to Reproduce
Desired result: every time you delete an item by clicking the SwipeView "delete" option, the corresponding item should be removed from the CollectionView, the CollectionView should be refreshed and all other open SwipeViews should stay open.
Error result: the SwipeView of the CollectionView items following the deleted item is getting closed.
Link to public reproduction project repository
https://github.com/Equabyte/MAUI_SwipeView_Error
Version with bug
8.0.20 SR4
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 14 (SDK34)
Did you find any workaround?
Not yet.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: