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
22.1k stars 1.73k forks source link

[Windows] CollectionView Infinite Scroll Bug : Scroll Resets to First Item at End #24578

Closed WaelBenBe closed 1 month ago

WaelBenBe commented 1 month ago

Description

When I scroll to the end of the list, instead of loading more items or stopping at the last item, the scroll position unexpectedly resets to the first item in the list

Steps to Reproduce

  1. Implement infinite scrolling on a CollectionView.
  2. Scroll through the items until you reach the end of the list.
  3. Observe that the scroll position returns to the first item instead of loading more items or staying at the end of the list.

Link to public reproduction project repository

https://github.com/WaelBenBe/InfinityScroll

Version with bug

8.0

Affected platforms

Windows

Affected platform versions

Windows SDK

github-actions[bot] commented 1 month ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

jaosnz-rep commented 1 month ago

I can repro this issue at Windows platform on the latest 17.12.0 Preview 1.0(8.0.82 & 8.0.80).

Foda commented 1 month ago

Hello! This can be fixed by setting the ItemsUpdatingScrollMode property to KeepScrollOffset on the CollectionView. You can find more info about this topic here

dotnet-policy-service[bot] commented 1 month ago

Hi @WaelBenBe. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

dotnet-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

dotnet-policy-service[bot] commented 1 month ago

Hi @WaelBenBe. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

WaelBenBe commented 1 month ago

@Foda thx for your comment , this fix the issue