Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS .NET 9] CollectionView Item Display Issue When ItemsSource is Changed #27165

Open
brett-macisaac opened this issue Jan 16, 2025 · 1 comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView i/regression This issue described a confirmed regression on a currently supported version partner/syncfusion Issues / PR's with Syncfusion collaboration platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@brett-macisaac
Copy link

brett-macisaac commented Jan 16, 2025

Description

If the user has selected an item in a CollectionView, then when the CollectionView's ItemsSource is changed from 'list A' to 'list B', some of the items in A are still rendered instead of the items in B.

I've only experienced this when targeting .NET 9; however, this issue doesn't occur when using version 9.0.0 of Microsoft.Maui.Controls (it occurs with every other 9.x version though).

I've only been able to replicate this issue on iOS; Android doesn't seem affected by it.

Steps to Reproduce

  1. Download the project linked below and open in visual studio. Connect to an iOS simulator or a physical Apple device. Build and run the app.
  2. Click the 'Load Letters' button. You should see five items displayed vertically, each with a string of letters.
  3. Click the 'Load Numbers' button. You should see a longer list of numbers.
  4. Click the 'Load Letters' button again. The list of letters should reappear. You should notice that no issues occurred when changing the underlying CollectionView's ItemsSource property between the 'letters' and 'numbers' lists.
  5. Select one of the items in the letters list (it should turn green).
  6. Click the 'Load Numbers' button. You should notice that the first five items in the numbers list aren't rendered; instead, the five items of the letters list are displayed, after which follow the remaining items of the numbers list.
  7. Scroll down the numbers list so that the letter rows are no longer on the screen, scrolling back up will reveal that the number rows are now being properly rendered (i.e. the moment a letter row goes off-screen, the issue is resolved).
  8. Scroll back to the top of the numbers list.
  9. Select one of the items in the numbers list.
  10. Click the 'Load Letters' button. You should notice that the letter rows don't render at all; instead, the first five items of the numbers list are displayed.
  11. Click the 'Load Numbers' button. Scroll down the numbers list so that the first three items are hidden above the page.
  12. Select one of the number rows.
  13. Click the 'Load Letters' button. You should notice that the first three letter rows are displayed, but the 4th and 5th rows are both number rows. If you repeat steps 11-13, except you scroll past the first 5 number rows, you'll notice that when switching to the letter list that all of the letter items are visible.

Link to public reproduction project repository

https://github.com/brett-macisaac/bug-colview-itemsource

Version with bug

9.0.30 SR3

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.0

Affected platforms

iOS

Affected platform versions

iOS 18

Did you find any workaround?

No response

Relevant log output

@brett-macisaac brett-macisaac added the t/bug Something isn't working label Jan 16, 2025
@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed i/regression This issue described a confirmed regression on a currently supported version labels Jan 16, 2025
@Marnie-Majait
Copy link

This issue has been verified using Visual Studio 17.13.0 Preview 2.1 (9.0.30 & 9.0.22). Can repro on iOS platform. And 8.0.100 & 9.0.0 works fine.

9.0.30

Image

9.0.0

Image

@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 16, 2025
@StephaneDelcroix StephaneDelcroix added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Jan 16, 2025
@StephaneDelcroix StephaneDelcroix added this to the Backlog milestone Jan 16, 2025
@PureWeen PureWeen modified the milestones: Backlog, .NET 9 SR5 Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView i/regression This issue described a confirmed regression on a currently supported version partner/syncfusion Issues / PR's with Syncfusion collaboration platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

6 participants