
Loading…
[0.9] when I move a dom-repeat element from one parent to another, the items will gone #1498
Well, I check the Polymer latest code and found this issue relative with the code here: https://github.com/Polymer/polymer/blob/0.8-preview/src/lib/template/dom-repeat.html#L199
In the dom-repeat there is a detached callback that will clear all the list item when the dom detached. I think it should add an attached callback to recover the element, otherwise the dom list will gone, but the Polymer element still have that data keep on it.
Q: When will people detached a list and attach it some where again?
A: I have a panel system that can freely dock itself from one parent to another. If there is a dom-repeat list in it, when the panel moving and dock to other place, the items in the dom-repeat will be detached based on the code I found above, but never recover again when the panel dock to other element. But as you see, the panel element still have the list data, so it should be recovered.
Yes, dom-repeat needs balanced re-attachment logic to re-insert stamped nodes back into the DOM after having been detached. This will be the fix.
In the
When I use
Polymer.dom(element("#second")).appendChild( element("#my-list") ), the whole list inside it will be removed.