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.21k stars 1.74k forks source link

Maui Grouped CollectionView incorrect item highlighted #22320

Open BarkerPep opened 5 months ago

BarkerPep commented 5 months ago

Description

When using the grouping functionality of a CollectionView it can be observed that the selected item highlighting jumps to the top item in a grouping.

Screenshot 2024-05-09 at 11 32 36 AM

Verified issue on:

Does not occur on:

Not tested:

Steps to Reproduce

  1. Run application on macOS or iOS
  2. Verify you are on the view "Collection"
  3. Select any item that is not the first item in a grouping. Example: GroupId: 1, ItemId: 5
  4. Observe the selected item highlighting

Expected: The tapped item is highlighted

Actual: The tapped item flashes, but then the first item in the group is highlighted.

Link to public reproduction project repository

https://github.com/BarkerPep/MauiGroupedCollectionViewRepro

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, macOS

Affected platform versions

No response

Did you find any workaround?

Use ListView instead of CollectionView

Relevant log output

No response

github-actions[bot] commented 5 months 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 5 months ago

Can repro this issue at iOS and macOS platforms on the VS for Mac 17.6.12 build 410 (8.0.21).