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

.NET MAUI IOS Collection view selection colour is Grey when we navigate to other page and come back again. #27945

Closed
thanigaiharan opened this issue Feb 21, 2025 · 3 comments
Labels
platform/iOS 🍎 s/triaged Issue has been reviewed t/bug Something isn't working

Comments

@thanigaiharan
Copy link

Description

In .NET MAUI IOS application , page with Collection view is retaining its selection and the selection colour is Grey when we navigate to other page and come back again.

Steps to Reproduce

  1. Add the Collection view with Items to display.
  2. Select any item to navigate to Next Page.
  3. Close the page to navigate to Collection view page .

Expected Result :
Item selection should not be retained and Item selected colour should not be Grey.

Original Result :

It retains the selection and Item selected colour is Gray.

Image

Link to public reproduction project repository

No response

Version with bug

9.0.40 SR4

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.30 SR3

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

NO.

Relevant log output

@thanigaiharan thanigaiharan added the t/bug Something isn't working label Feb 21, 2025
@riccardominato
Copy link

riccardominato commented Feb 21, 2025

I think that it's an intended behavior. When you tap on an item, SelectedItem gets the value of that item and this causes the gray coloring. Navigating to another page doesn't have anything to do with the item state.

You have to manually set SelectedItem to null when you navigate, if you want it to turn white again.
You could also try to set SelectionMode to None.

@jfversluis
Copy link
Member

Thanks for all the help here! I think this is a duplicate of #26187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/iOS 🍎 s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants