Skip to content

CollectionView selection is ineffective with record structs on Windows #33487

@jeremy-visionaid

Description

@jeremy-visionaid

Description

If data binding to a type that's a reference struct, then selecting an item is ineffective on Windows (but it works OK on iOS/MacCatalyst)

Steps to Reproduce

  1. Clone the repro repo
  2. Run the sandbox project
  3. Observe that the first item is not shown as selected on Windows

Link to public reproduction project repository

https://github.com/jeremy-visionaid/maui/tree/collectionview-value-type-selection-repro

Version with bug

10.0.20

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

The type could be changed to a record class if it's something under developer control.

Multiple selection mode also works since that uses value equality.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    t/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions