Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

[Bug] CollectionView: Item indices in the Scrolled event args (ItemsViewScrolledEventArgs) are incorrect on iOS when IsGrouped = true

Open chrisstaley opened this issue 4 years ago • 5 comments

Description

When a CollectionView's IsGrouped property is set to true, the values of FirstVisibleItemIndex, CenterItemIndex, and LastVisibleItemIndex specified in the ItemsViewScrolledEventArgs passed to the Scrolled event handler are incorrect. They appear to be unable to reflect the indicies of any items beyond the first group.

It should be noted that the indices are reported correctly on Android.

Steps to Reproduce

  1. Open the attached solution.
  2. Run the iOS app.
  3. Scroll the list.
  4. Make note of the indices reported in the debug output.

Expected Behavior

The indices of items in groups other than the first group should appear as the list is scrolled.

Actual Behavior

Only the indices of the first group are reported in the event args, even though those items are clearly not the first/center/last items.

Basic Information

  • Version with issue: 4.5.0.617
  • Platform Target Frameworks:
    • iOS: 11.4

Reproduction Link

IssueRepro.zip

chrisstaley avatar Apr 20 '20 15:04 chrisstaley

See also #9989

hartez avatar Feb 09 '21 00:02 hartez

We are facing the same issue. We are using Xamarin.Forms 5.0.2012. Is there anyone who have found any solution?

See also #13787

hartez avatar Feb 18 '21 21:02 hartez

Does anyone have an update or a workaround?

AdrianoBinhara avatar Mar 31 '21 04:03 AdrianoBinhara

Any news, when, this could be fixed on iOS?

CleverSoftwarePoland avatar Aug 06 '22 06:08 CleverSoftwarePoland