dotnet / dotnet/maui

[MacOS, iOS] ListView and CollectionView on the fly changes don't change the size of the layout

Open
#7,967 22 comments 5 reactions 0 assignees View on GitHub
area-layout platform/ios platform/macos s/triaged s/verified t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

We have an application that requires elements inside the listview / collectionview to open if it's the selected one, and close when it's not.

It works perfectly fine on Windows, and Android, but the Apple ecosystem does not handle it well.

ForceUpdateSize in ListViews doesn't seem to effect things
CollectionView:
![CollectionView](https://user-images.githubusercontent.com/40233496/173238269-c4acf60f-f2ef-4e82-a8b5-a4092537c0e8.png)
ListView:
![ListView](https://user-images.githubusercontent.com/40233496/173238273-d3ba026a-a013-49b9-839c-83ae4763de64.png)
.

Expected (Windows):
![image](https://user-images.githubusercontent.com/40233496/173238367-917843af-7118-4ec5-b1a5-1fc3b9617c86.png)

### Steps to Reproduce

Create a new app.
Put a ListView in it, with a Button.
Set a Clicked event to the Button.
Change the HeightRequest, or in the case of a Grid, the RowDefinitions with the Clicked event.
Run the app.
Click on an element.
CollectionView: The selected element expands behind the other elements
ListView: The selected element expans in front of the other elements.

### Version with bug

6.0 (current)

### Last version that worked well

Unknown/Other

### Affected platforms

iOS, macOS

### Affected platform versions

iOS 15, MacOS 14

### Did you find any workaround?

_No response_

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reproducing the issue in a new app with a ListView and CollectionView, changing HeightRequest or Grid RowDefinitions from a Button Clicked event on iOS and macOS. Done means the selected item expands or collapses and the surrounding layout resizes without overlap, matching the Windows and Android behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, ios, macos
Domain
desktop, frontend, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.