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

CollectionView - ItemsUpdatingScrollMode="KeepScrollOffset" does not work in Windows #22162

Closed
schlaman opened this issue May 2, 2024 · 4 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/windows 🪟 s/needs-repro Attach a solution or code which reproduces the issue s/triaged Issue has been reviewed t/bug Something isn't working

Comments

@schlaman
Copy link

schlaman commented May 2, 2024

Description

I have a collection view with ItemTemplate={StaticResource MyTemplateSelector}
I have a dozen different templates to basically present the list of items as 'Widgets'.
I want to keep the scroll position the same even though new items are being added to my CollectionView.

In Windows if I am scrolled somewhere away from the beginning of the list then as I add an item, the list scrolls back to the beginning each time.

In iOS when I am scrolled away from the beginning of the list and I add an item, then the scrolling position is unchanged.

Steps to Reproduce

Create a .NET Maui Shell app and have a ContentView that contains a CollectionView and put enough items in it to allow for multiple pages of scrolling and also set ItemTemplate={StaticResource MyTemplateSelector}.

Also, set the CollectionView ItemsUpdatingScrollMode="KeepScrollOffset"

As you scroll to somewhere in the middle of the list (off the screen) and then you add a new item, in Windows observe that as you add a new item that the scrolling position snaps to the top (it should have stayed put but it did not).
In iOS observe that the scrolling position does NOT move at all as you add a new item (CORRECT behavior).

Link to public reproduction project repository

No response

Version with bug

8.0.21 SR4.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

No response

@schlaman schlaman added the t/bug Something isn't working label May 2, 2024
@Eilon Eilon added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label May 2, 2024
@PureWeen PureWeen changed the title CollectionView - ItemsUpdatingScrollMode="KeepScrollOffset" does NOT work in Windows but does work in iOS CollectionView - ItemsUpdatingScrollMode="KeepScrollOffset" does not work in Windows May 2, 2024
@PureWeen PureWeen added the s/needs-repro Attach a solution or code which reproduces the issue label May 2, 2024
@PureWeen
Copy link
Member

PureWeen commented May 2, 2024

/similarissues

Copy link
Contributor

github-actions bot commented May 2, 2024

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.

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels May 2, 2024
@jaosnz-rep jaosnz-rep added the s/triaged Issue has been reviewed label May 17, 2024
@jsuarezruiz jsuarezruiz added s/needs-repro Attach a solution or code which reproduces the issue and removed s/needs-attention Issue has more information and needs another look labels Jun 4, 2024
Copy link
Contributor

Hi @schlaman. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

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 dotnet-policy-service bot added the s/no-recent-activity Issue has had no recent activity label Jun 10, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue 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.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2024
@dotnet-policy-service dotnet-policy-service bot removed the s/no-recent-activity Issue has had no recent activity label Jul 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/windows 🪟 s/needs-repro Attach a solution or code which reproduces the issue s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants