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

[Bug] Attached Collection Property return the property for all views and not just the one that is calling #9151

Open
MathewLC opened this issue Jan 10, 2020 · 2 comments
Labels
a/binding ⛓ e/3 🕒 3 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!

Comments

@MathewLC
Copy link
Contributor

Description

When having Collection like IList as an attached property, GetValue return the value for all views that has this property instead of return just the property related to the view that is calling GetValue.

Steps to Reproduce

  1. Run the sample.
  2. Click on the button that will execute code to get the properties to different views.

Expected Behavior

Method return property related only to itself.

Actual Behavior

view.GetValue return properties to all views that has it.

Basic Information

  • Version with issue: Xamarin.Forms (4.4.0.991265)

Reproduction Link

Sample with Issue

@MathewLC MathewLC added s/unverified New report that has yet to be verified t/bug 🐛 labels Jan 10, 2020
@pauldipietro pauldipietro added this to New in Triage Jan 10, 2020
@jfversluis
Copy link
Member

Confirmed this is happening. Both on iOS and Android, which makes sense since its shared code.

I went back to 3.6 and there it also happens. So I'm assuming this has been in there forever.

@jfversluis jfversluis added e/3 🕒 3 and removed s/unverified New report that has yet to be verified labels Jan 10, 2020
@jfversluis jfversluis moved this from New to Ready For Work in Triage Jan 10, 2020
@samhouts samhouts added this to To do in Other Ready For Work Jan 17, 2020
@samhouts samhouts removed this from Ready For Work in Triage Jan 17, 2020
@samhouts samhouts added inactive Issue is older than 6 months and needs to be retested help wanted We welcome community contributions to any issue, but these might be a good place to start! up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! and removed inactive Issue is older than 6 months and needs to be retested help wanted We welcome community contributions to any issue, but these might be a good place to start! labels Jul 17, 2020
@samhouts samhouts added inactive Issue is older than 6 months and needs to be retested help wanted We welcome community contributions to any issue, but these might be a good place to start! and removed inactive Issue is older than 6 months and needs to be retested labels Jul 31, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts added this to To do in vNext+1 (5.0.0) Aug 14, 2020
@samhouts samhouts added the inactive Issue is older than 6 months and needs to be retested label Sep 18, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@GalaxiaGuy
Copy link
Contributor

@MathewLC @StephaneDelcroix Is this really a bug? It seems to happen because the default value, a new List<MyCustomClass> is shared between uses of the bindable property.

If I change it to use defaultValueCreator: _ => new List<MyCustomClass>() everything seems to work fine.

GalaxiaGuy added a commit to GalaxiaGuy/Xamarin.Forms that referenced this issue Oct 25, 2021
jsuarezruiz pushed a commit that referenced this issue Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/binding ⛓ e/3 🕒 3 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
Development

No branches or pull requests

4 participants