Skip to content

CollectionView SelectedItem loses Background after opening and closing a Modal page #22467

@jgon34

Description

@jgon34

Description

Changing CollectionView SelectedItem BackgroundColor using VisualStateManager does not seem to be working properly on iOS. If an item is in the Selected state and we change the background color, open a modal page, then close that modal page, the SelectedItem no longer has the background color that was previously set.

Steps to Reproduce

  1. Run linked github project
  2. Select an item in the list
  3. Click "Click Me" button to open a modal page
  4. Click "click me" button on the modal page to close it
  5. SelectedItem on MainPage loses background color

Link to public reproduction project repository

https://github.com/jgon34/maui-bug

Version with bug

8.0.20 SR4

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 17.2

Did you find any workaround?

Use async messaging bus to send message back to underlying page to re-select the item when the modal is dismissed.

Relevant log output

No response

Example gif:
visualstatemanager_bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewCollectionView, CarouselView, IndicatorViewpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/ioss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions