Created an issue for this: https://github.com/Polymer/polymer/issues/3316
On Thu, Jan 21, 2016 at 5:42 AM, Simona Butnaru < [email protected]> wrote: > When adding an element in array, using splice method, and then change a > subproperty from the added item, the path from array observation is not the > correct one. > Let's say we have a persons array with 11 objects, each object having name > and age as properties. When adding a person {name: Sim, age: 24} on > position 2, and after change the property name of person Sim, the observer > method returns the path "data.#11 > <https://github.com/Polymer/polymer/issues/11>.name". > I expected the path to be "data.#2 > <https://github.com/Polymer/polymer/pull/2>.name" because I added the > item on the second position. > > > Here is a jsfiddle that reproduces the error. > https://jsfiddle.net/simona_butnaru/zfwewthr/5/ > > I made a little research and I've seen that the issue is from polymer, at > the add function from Polymer.Collection. This line (var key = > this.store.push(item) - 1;) sets the key to be the length of array, and I > think the key shoud be the position where the item was added in array. > > Follow Polymer on Google+: plus.google.com/107187849809354688692 > --- > You received this message because you are subscribed to the Google Groups > "Polymer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/polymer-dev/b2f90593-46d6-4572-816e-af2df076f627%40googlegroups.com > <https://groups.google.com/d/msgid/polymer-dev/b2f90593-46d6-4572-816e-af2df076f627%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAJj5OwC7kX_sgsSZCYXSW8hHj_kp81%2BBr99s5vTKgtbJqHDzRg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
