Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Items do not render in CollectionView after scrolling when wrapped in ContentView #5248

Closed
Dreamescaper opened this issue Mar 11, 2022 · 2 comments
Assignees
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint platform/android 🤖 s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Milestone

Comments

@Dreamescaper
Copy link

Dreamescaper commented Mar 11, 2022

Description

So a couple of things are needed to reproduce this issue:

  • Some Element visibility changes depending on the item.
  • This element is contained in ContentView (I cannot repro this issue if I wrap it in VerticalStackLayout)
xaml
    <CollectionView ItemsSource="{Binding Items}">
        <CollectionView.ItemTemplate>
            <DataTemplate>
                <ContentView>
                    <VerticalStackLayout>
                        <ContentView IsVisible="{Binding OneEnabled}" BackgroundColor="Cyan"  HeightRequest="120">
                            <Label Text="1" FontSize="30"/>
                        </ContentView>
                        
                        <ContentView IsVisible="{Binding TwoEnabled}" BackgroundColor="LightPink"  HeightRequest="120">
                            <Label Text="2" FontSize="30"/>
                        </ContentView>
                        
                        <ContentView IsVisible="{Binding ThreeEnabled}" BackgroundColor="LightGreen"  HeightRequest="120">
                            <Label Text="3" FontSize="30"/>
                        </ContentView>
                    </VerticalStackLayout>
                </ContentView>
            </DataTemplate>
        </CollectionView.ItemTemplate>
    </CollectionView>

When you scroll the collection view, items start to disappear.
If you update visibility for an existing item, it disappears as well.

Repro project: https://github.com/Dreamescaper/maui-5248-repro

Screen recording:
qemu-system-x86_64_BpmzRborBP

Steps to Reproduce

  1. Run repro project.
  2. Scroll the CollectionView.

Version with bug

Preview 13 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 12

Did you find any workaround?

Wrap it in VerticalStackLayout (with single element) instead of CollectionView.

Relevant log output

No response

@Dreamescaper Dreamescaper added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Mar 11, 2022
@Amir-Care Amir-Care added the s/triaged Issue has been reviewed label Mar 14, 2022
@Amir-Care
Copy link

Verified repro with Version 17.2.0 Preview 2.0 [32208.484.main]

@Amir-Care Amir-Care added s/verified Verified / Reproducible Issue ready for Engineering Triage and removed s/triaged Issue has been reviewed labels Mar 14, 2022
@jsuarezruiz jsuarezruiz added area-controls-collectionview CollectionView, CarouselView, IndicatorView and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels Mar 14, 2022
@jsuarezruiz jsuarezruiz added this to Ready For Work in Triage Mar 14, 2022
@Redth Redth added this to the 6.0.300 milestone Mar 22, 2022
@davidortinau davidortinau added the p/0 Work that we can't release without label Apr 29, 2022
@Redth Redth added p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint and removed p/0 Work that we can't release without labels May 3, 2022
@VincentBu
Copy link

not repro on vs main build:
image

Triage automation moved this from Ready For Work to Done May 9, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jun 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint platform/android 🤖 s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

8 participants