maui icon indicating copy to clipboard operation
maui copied to clipboard

Custom CollectionView footer disappears when adding items

Open hannesschulze opened this issue 3 years ago • 5 comments

Description

When items are added to a collection view using a custom view as its footer, the footer sometimes disappears. When more items are added, it reappears.

I was able to reproduce this bug on Android (emulator), not on Windows. Other platforms were not tested.

https://user-images.githubusercontent.com/43932053/179233794-5a32b62e-0858-429a-80a7-d26b8019ce8b.mp4

Steps to Reproduce

  1. Clone https://github.com/hannesschulze/MauiCollectionViewFooterBug
  2. Launch the app on Android
  3. Click the "Add Item" button

Expected behavior: The footer remains visible when new items are added Actual behavior: The footer sometimes disappears

Version with bug

6.0.408 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 12

Did you find any workaround?

No response

Relevant log output

No response

hannesschulze avatar Jul 15 '22 14:07 hannesschulze

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost avatar Feb 07 '23 17:02 ghost

I'm also having this issue. Is this going to be fixed? Any workaround?

tranb3r avatar Feb 15 '23 10:02 tranb3r

Verified this issue with Visual Studio Enterprise 17.6.0 Preview 7.0. Repro on android platform with project. MauiCollectionViewFooterBug-main.zip Android

Zhanglirong-Winnie avatar May 17 '23 03:05 Zhanglirong-Winnie

To fix this problem, you need to add this code after adding a new item:

(collection.Footer, collection.Footer) = (null, collection.Footer);

or

object footer = collection.Footer;
collection.Footer = null;
collection.Footer = footer;

MegaEgorik avatar Jul 26 '23 16:07 MegaEgorik

Is this going to be fixed?

tranb3r avatar Feb 20 '24 19:02 tranb3r

The workaround now seems to cause an undesired scrolling of the collectionview.

tranb3r avatar Apr 26 '24 07:04 tranb3r

As mentionned in #20666 , the footer only disappears when the collectionview happens to have an even number of items, I was able to reproduce it as well on Visual Studio Community 2022 - 17.9.5

gchapeaux avatar May 09 '24 14:05 gchapeaux

I have the same issue with MAUI 8.0.40 and VS 17.10.0. It seems that #20666 is a duplicate.

The workaround works for me, but it is quite unfortunate that almost for two years this remains not fixed.

nshtinkov avatar May 29 '24 17:05 nshtinkov

Duplicate of #20666

PureWeen avatar Jun 06 '24 16:06 PureWeen