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 First and Last Visible Item index in CollectionView Scrolled Event #26468

Merged
merged 9 commits into from
Jan 7, 2025

Conversation

devanathan-vaithiyanathan
Copy link
Contributor

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Dec 9, 2024

Issue Details

In the CollectionView, the Scrolled event parameters FirstVisibleItemIndex and LastVisibleItemIndex return incorrect values.

Root Cause

The CollectionView includes the header at the zeroth index and the footer at the last index. As a result, the first and last visible item positions are updated without excluding the header and footer.

Description of Change

Implemented logic to calculate the first and last visible item positions, excluding the header and footer.

Issues Fixed

Fixes #25649

Validated the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Output Screenshot

Before After
BeforeFix.1.mp4
AfterFix.1.mp4

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Dec 9, 2024
@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 9, 2024
@jfversluis jfversluis added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Dec 9, 2024
@devanathan-vaithiyanathan devanathan-vaithiyanathan marked this pull request as ready for review December 11, 2024 13:52
@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho
Copy link
Member

/rebase

@rmarinho
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho rmarinho merged commit b5d4c66 into dotnet:main Jan 7, 2025
104 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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 OnCollectionViewScrolled Calls and parameters are inconsistent or incorrect
6 participants