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.63k stars 1.61k forks source link

In iOS, CollectionView row does not shift down if row above it resizes #22082

Closed grantlogsdon1 closed 2 days ago

grantlogsdon1 commented 2 weeks ago

Description

In iOS, when the size of a row in a CollectionView increases, it appears behind the rows below it. WinUI/Android work as expected where the rows shift down as to not overlap the resized row.

More Context: The Data Template for my CollectionView contains a Grid with one row defined as ‘*’. The row contains multiple columns with controls. One of the controls is a custom control that that functions like a ComboBox (since there is no built in MAUI control for this). This ComboBox is what leads to the requirement that the row have a dynamic height. It consists of a Entry and a CollectionView stacked on top of each other. The user is able to type into an entry field and CollectionView appears below the entry with filtered results based on the users input. When the ComboBox's CollectionView appears, the whole row grows to accommodate the new height (I have not found a reliable way to make it just overlap on top of the rows below it).

In WinUI: https://github.com/dotnet/maui/assets/88509644/7c7d87fa-3b74-4105-b93a-fbb2b5901419

In iOS https://github.com/dotnet/maui/assets/88509644/a6c87f4c-eac8-44f3-824c-7e7ac8347d24

Steps to Reproduce

  1. Create a CollectionView. Bind to a list with multiple items, so that CollectionView will have multiple rows.
  2. Add a Grid into the CollectionView data template with one row defined as '*' or 'Auto' (Both have the same result)
  3. In the Grid, add a control that can be resized by an action performed in the app. I have a CollectionView that will get populated with labels
  4. Perform action to cause collection view row to grow

Link to public reproduction project repository

https://github.com/grantlogsdon1/CollectionViewResizeBugRepro

Version with bug

8.0.7 SR2

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.8004 iOS 17.4

Did you find any workaround?

No

Relevant log output

No response

grantlogsdon1 commented 1 week ago

Here is the repro app: https://github.com/grantlogsdon1/CollectionViewResizeBugRepro

QianaJiao commented 5 days ago

Can repro this issue at iOS platform on the latest 17.10 Preview 6 (8.0.21).

drasticactions commented 2 days ago

Duplicate of https://github.com/dotnet/maui/issues/13451