Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ListView template's child components aren't updated #612
I ran into a weird issue with a ListView who's template had a child component. When I started scrolling down and back up in the ListView, the child components started to change which parent template they were associated with.
I made a sample app to illustrate this problem.
I attempted to move the template code into it's own component, which didn't solve this issue. (I read that solved another, somewhat similar, issue.)
This child component has an
I'm wondering if this is a bug, or just something that needs to be documented? It certainly wasn't obvious to me that a ListView template component's children could become associated with another component. (Although I can guess that this has to do with the reuse of allocated visual elements, but still figured that it would trickle down to child components.)
Let me know if there is anything else you need me to provide.
Hey @jzgoda thank you for your project and great explanations of the issue you have encountered - indeed I think this is a good addition for a documentation article or sdk example.
The solution with using onChanges is the way to go when you want watch the immutable input in your child component. Great blog post on that matter can be found here (the approach you have used is shown at the end of the article as the right solution for similar scenario)