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
21.95k stars 1.7k forks source link

Using CollectionView for a list with items that can expand/collapse on tap doesn't properly resize on iOS #23033

Open helixaril opened 2 months ago

helixaril commented 2 months ago

Description

I am working on an application, which me and my team are porting from Xamarin.Forms to MAUI. In the Xamarin app we implemented an expansion list using CollectionView. The list would have several items and whenever you would tap on one it would expand the item. The expanded item could contain text, images, buttons etc.

However, now in MAUI, the same code using CollectionView works perfectly on Android, but on iOS whenever I collapse an item the size doesn't change back to the original one.

I attached two images to showcase it. In the first one you can see how the list should open when first accessing the page containing it (iOS left, Android right). image

On the second image I collapsed the first item in the list and as you can see for iOS it doesn't resize image

The size of the item goes back to normal only if I scroll past that item and then scroll back

Steps to Reproduce

No response

Link to public reproduction project repository

https://github.com/helixaril/ExpansionListReproduce

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 2 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.

kevinxufei commented 2 months ago

Verified this issue with Visual Studio 17.11.0 Preview 2.0 (8.0.60 & 8.0.40 & 8.0.21 & 8.0.3). Can repro on iOS platform with sample project.

MortenGregersen commented 2 months ago

We see a similar issue in our app with MAUI 8.0.14