-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] CollectionView iOS draws both EmptyView and Items/ItemTemplate #13794
Comments
@RemcoDEV Can you post a small reproduction project? Or at least paste in an example of your ItemTemplate, EmptyView, and the code you're using to set up your ItemsSource? |
@RemcoDEV I encounter the same bug. A possible workaround is to add @hartez If it is any help I can report that this bug only occurs when the |
Tnx man! |
Same issue for me. Draws both Empty and Item View. Not using Tabbed Page. Xamarin test team should really use rest service to test with some async calls. I am sure all this works when you have data hardcoded into the view model. Just updated to 5.0.0.2012 from 5.0.0.1931. There are other issue in 5.0.0.1931 that breaks CollectionView binding when visibility state is initially false. At least that seems to be fixed in 5.0.0.2012. |
Hello all, can someone please upload a small reproduction of this issue so we can investigate it further?! thanks. |
Same problem here. |
@marcojak can you please upload a small reproduction of the issue? |
@hartez @rmarinho @Redth , I have added a small repro project. There is some gross code incoming so brace yourselves. In this particular case I was able to replicate it by doing what I do in my prod app, which took me down a rabbit hold where I found some jank code. Fixing my jank fixes the issue, however I think the underlying issue may still happen in other circumstances. Problem is only present when for me Within My workaround is to fix the jank and move this line to before I set the So yeah, there is some things here that I shouldn't be doing, but its still putting |
@RemcoDEV @beeradmore, a PR for this is open now (#14603), would you be able to grab the NuGet as described here and let us know if this fixes this issue? That will greatly speed up the review process. Besides verifying if this particular issue is fixed also be sure to check other scenarios in the same area to make sure that this fix doesn't accidentally has side-effects 🙂 Thanks! |
Hi @jfversluis , Just tested. It still does not work on the latest XF 5.0.0.2125 (pull request of Javier is from before that release date). The pull request of Javier does not change any logic, it are just tests. It can be approved without causing any side effects :). Regards, |
Sorry about that Remco! Just noticed a PR and added that message in the hope you could test it :D Seems we have some work to do here still, thanks! |
I suspect something in here has to do with it: #13678 |
Hey @beeradmoore @RemcoDEV, a PR (#15122) for this is open now, would you be able to grab the NuGet as described here and let us know if this fixes this issue? That will greatly speed up the review process. Make sure to take the exact version as attached to this PR. Besides verifying if this particular issue is fixed also be sure to check other scenarios in the same area to make sure that this fix doesn't accidentally has side-effects 🙂 Thanks! |
Hi @jfversluis . It seems to work as intended. No side effects found. Thank you! |
@jfversluis , my above repro is in a weird state where trying to use it (either with the XF it has, updated, or updated to the PR version) where attempting to scroll it crashes it. That repro also has some weird things happening in it so it may be because of that. I tried it in our production app and I didn't notice any new problems. However in its pre-PR-nuget state we also no longer were experiencing this issue. I however do still have header/footer showing when CollectionView is empty and displaying the correct EmptyView. I have a feeling that this isn't a bug and instead a design choice. Changing that behaviour will impact anyone using header/footer + EmptyView so its probably best left untouched (unless we want to add some new HideHeaderOnEmpty HideFooterOnEmpty properties to CollectionView in MAUI). |
Perfect, thanks so much for taking the time to verify and provide me with this input! Looks like I'll be merging this for now and look at the other mentioned things separately. |
Description
CollectionView iOS draws both EmptyView and Items/ItemTemplate. The itemtemplate UI becomes unresponsive, because the emptyview is drawn over it.
Steps to Reproduce
Expected Behavior
Only draw the emptyview when the itemssource is empty.
Actual Behavior
Both the emptyview and the items/itemtemplates are drawn.
Basic Information
Environment
Visual Studio 2019 / Windows 10
Build Logs
--
Screenshots
'Nothing to display' is the emptyview.
This example is a grouped collectionview, but it also happens to non-grouped collectionviews.
Reproduction Link
--
Workaround
Reconstructing the page sometimes works.
Refreshing does not work. Something definitely goes wrong when constructing the page.
The text was updated successfully, but these errors were encountered: