dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.86k stars 1.68k forks source link

iOS CollectionView renders wrong content in cell with GridItemsLayout #13753

Open edgiardina opened 1 year ago

edgiardina commented 1 year ago

Description

Using a collectionview with itemslayout of Grid and a Span of two, I am seeing the Data Template load in the wrong images in a collectionview. SCrolling the affected cell out of view and back in will swap the content in with a random image in the provided reproduction repository. This example shows how the second row, first columnb item is missing an image on load, and on scroll down, is replaced with the wrong image. At the end of the grid, the item from Column 1 Row 1 is repeated, even though it is not repeated in the dataset. (Aerosmith) Simulator_Screen_Recording_-_iPhone_14_-_2023-03-07_at_18_46_42_AdobeExpress

Steps to Reproduce

  1. Create a File -> New Maui Project
  2. Create a CollectionView whose DataTemplate contains a VerticalStackLayout containing an image contained in a border, and a Label.
  3. Bind the CollectionView to a datasource
  4. Witness

Link to public reproduction project repository

https://github.com/edgiardina/CollectionView_WrongImages_MauiBug

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 16.2 iPhone 14 Simulator(and other iOS devices)

Did you find any workaround?

No response

Relevant log output

No response

Zhanglirong-Winnie commented 1 year ago

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 2.0. Can repro on iOS platform with sample project. CollectionView.zip Screenshot 2023-06-25 163320

edgiardina commented 3 months ago

This has seen no attention. It affects my project but also some others including plugin.Maui.calendar on iOS