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

Fix Incorrect Scrolling Behavior in CollectionView ScrollTo Method Using Index Value #27246

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Shalini-Ashokan
Copy link
Contributor

@Shalini-Ashokan Shalini-Ashokan commented Jan 21, 2025

Issue Details

The ScrollTo method does not work correctly in a CollectionView when scrolling based on an index. This issue occurs only when the CollectionView includes a header.

Root Cause

The CollectionView considers the header as the zeroth index. Consequently, the scrolling does not navigate to the correct item index.

Description of Change

Modified the item position calculation to ensure proper scrolling behavior.

Validated the behavior in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #27117

Output ScreenShot

Before After
Screenshot 2025-01-21 at 6 33 20 PM Screenshot 2025-01-21 at 6 40 51 PM

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 21, 2025
Copy link
Contributor

Hey there @Shalini-Ashokan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 21, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

@jsuarezruiz jsuarezruiz added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Jan 21, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@Shalini-Ashokan Shalini-Ashokan marked this pull request as ready for review January 21, 2025 15:33
@Shalini-Ashokan Shalini-Ashokan requested a review from a team as a code owner January 21, 2025 15:33
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

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 community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CollectionView ScrollTo not working under android
3 participants