-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Platform:
- OS: [iOS]
- Device: [iPhone7+/iPhoneSimulator]
- Sdk vervion: [iOS 10.2/iOS 12.1]
- Xamarin.Forms: [3.4.0.1029999/3.6.0.220655]
Bug description
When using a DataTemplateSelector iOS is recycling the wrong DataTemplate cell.
A recycle strategy that takes the DataTemplate in account when recycle should be implemented to fix it, similar to the one used on Xamarin.Forms:
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/listview/performance#recycleelement-with-a-datatemplateselector
To Reproduce
Steps to reproduce the behavior:
I've modified the SillyCompany sample app to reproduce the issue.
I've created a flag to indicate whether a dude is a favorite one or not. If he is a favorite one the background color of the card will be yellow. The following dudes were flagged as a favorite: Knights of Ni, Triumph, Steve Carell, IT Guy.
- Check the following branch: bug-template-recycle
- Scroll fast and multiple times the carousel.
- The carousel will be messed showing "Favorite dudes" with a white background and not "Favorite dudes" in a yellow background.
Video
The following video presents the bug pretty clear:
https://github.com/EltonGarcia/Xamarin-Forms-Practices/blob/bug-template-recycle/BugVideo/recyclebug.mp4