Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] CollectionView ChildAdded #10454

Closed
andrewBezerra opened this issue Apr 25, 2020 · 4 comments · Fixed by #10812
Closed

[Bug] CollectionView ChildAdded #10454

andrewBezerra opened this issue Apr 25, 2020 · 4 comments · Fixed by #10812
Labels
a/collectionview e/3 🕒 3 in-progress This issue has an associated pull request that may resolve it! t/bug 🐛
Milestone

Comments

@andrewBezerra
Copy link

Description

Event ChildAdded on CollectionView don`t fire.

Steps to Reproduce

  1. CollectionView with an ItemSource from ViewModel.
  2. Add ChildAdded Event
  3. On ChildAdded put a DisplayAlert.

Expected Behavior

Display alert on new item added on collectionview.

Actual Behavior

Do notting

Basic Information

  • Version with issue: Xamarin.Forms v4.5.0.617

  • IDE: Visual Studio 2019

  • Platform Target Frameworks:

    • Android: 9
  • Nuget Packages: Sharpnado.Presentation.Forms 1.5.1

  • Affected Devices: All

GitHub Project

https://github.com/andrewBezerra/Xamarin_TODO

-> MyTasksView.xaml
-> MyTasksView.xaml.cs

@andrewBezerra andrewBezerra added s/unverified New report that has yet to be verified t/bug 🐛 labels Apr 25, 2020
@pauldipietro pauldipietro added this to New in Triage Apr 25, 2020
@hartez hartez added a/collectionview e/3 🕒 3 and removed s/unverified New report that has yet to be verified labels Apr 29, 2020
@hartez hartez added this to Backlog in CollectionView via automation Apr 29, 2020
@hartez hartez removed this from New in Triage Apr 29, 2020
@neville-nazerane
Copy link

I noticed this too while working with the latest nightly builds. This would be a great bug fix to have.
In case it helps anyone, as a workaround, for now, I just listened for changes in the ItemsSource.

You will need to listen to the property changed of the CarouselView, cast ItemsSource to INotifyCollectionChanged and then subscribe to the CollectionChanged event.

@vniehues
Copy link

This is actually huge for some users (myself included).
I used to set alternating row colors for ListViews / BindableLayouts by listening to the ChildAdded event and setting the row color based on an index.
We can't do that anymore and the alternative (templates + selector) is only feasable for "smaller layout" but in my case i got a grid per row with 6 different columns and some GestureRecognizers and in a SwipeView - having this massive piece of XAML twice in one page is just not readable at all.

@jsuarezruiz jsuarezruiz moved this from Backlog to In Progress in CollectionView May 21, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label May 28, 2020
@samhouts samhouts added this to In Progress in 4.7.0 Jun 20, 2020
@Denn1Ro
Copy link

Denn1Ro commented Aug 3, 2020

Hi,
Any progress of this issue? I am using 4.7.0.1080 and it's still exist.
Thank you.

@vniehues
Copy link

vniehues commented Aug 4, 2020

@Denn1Ro this here is the link to the corresponding PR #10812
To me it looks like there is some good progress happening. I'm waiting aswell...

@samhouts samhouts removed this from In Progress in 4.7.0 Aug 4, 2020
@samhouts samhouts added this to In Progress in vNext+1 (5.0.0) Aug 11, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
CollectionView automation moved this from In Progress to Done Sep 18, 2020
vNext+1 (5.0.0) automation moved this from In Progress to Done Sep 18, 2020
rmarinho pushed a commit that referenced this issue Sep 18, 2020
* Notify child added to CollectionView

* Automate the test

* Fixed merge problem

Co-authored-by: E.Z. Hart <hartez@gmail.com>
@samhouts samhouts removed this from Done in CollectionView Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/collectionview e/3 🕒 3 in-progress This issue has an associated pull request that may resolve it! t/bug 🐛
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

6 participants