maui
maui copied to clipboard
Fix iOS ListView cell gone hidden (#11287)
Description of Change
Workaround iOS / MacOS ListView cell disappear when user scroll back and DequeueReusableCell return a hidden cell. Force any hidden cell return by DequeueReusableCell which are hidden to create a new cell instead (set hidden to false doesn't work).
Issues Fixed
Fixes #11287
Hey there @ooikengsiang! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.
@dotnet-policy-service agree
@ooikengsiang please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@dotnet-policy-service agree [company="{your company}"]Options:
- (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
- (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"Contributor License Agreement
@dotnet-policy-service agree
/azp run
Azure Pipelines successfully started running 2 pipeline(s).
Azure Pipelines successfully started running 2 pipeline(s).
@PureWeen I have a repro here: https://github.com/dotnet/maui/issues/13633 which might be the same issue, it was also linked with the original issue. The only difference is that in my issue cells become hidden when app goes into background and come back while in the original issue its when scrolling through the list. But the result is the same, cells become hidden.
@ooikengsiang Not sure if I'm missing something but I think the wrong reproduction was uploaded to the original issue? https://github.com/ooikengsiang/ListViewProblem ?
Can you point me to a reproduction of the issue so that I can test your fix?
Fixed, sorry for the mix up.
👀
I think the main problem here is that the viewhandler on the ViewCellRenderer is being completely disconnected.
I've checked in an alternate approach here https://github.com/dotnet/maui/tree/13669_testing
can you let me know how that works for you? if that seems to address the problem?
Let me check and will get back to you.
I think the main problem here is that the viewhandler on the ViewCellRenderer isn't being completely disconnected.
FYI, I meant to say isn't being disconnected.
I think the main problem here is that the viewhandler on the ViewCellRenderer isn't being completely disconnected.
I think the main problem here is that the viewhandler on the ViewCellRenderer isn't being completely disconnected.
FYI, I meant to say isn't being disconnected.
I think the main problem here is that the viewhandler on the ViewCellRenderer isn't being completely disconnected.
Test and it work! Awesome, never know that disconnect is required there. Thanks for spending extra time looking into this.
Thank you for testing @ooikengsiang and narrowing down to where this was being quirky!
Closing this PR in favor of https://github.com/dotnet/maui/pull/15036
Thank you for testing @ooikengsiang and narrowing down to where this was being quirky!
Closing this PR in favor of #15036
@ooikengsiang if you have time can you test my updates here?
https://github.com/dotnet/maui/pull/15036
I think I was also breaking recycling with my changes :-)
I tried your repro and a few of our samples and they seemed to work fine.