Hi!
Is the observers in polymer somehow connected to it's place in the DOM?
I'm working on a loooong list with up to 5000 (heavy) polymer elements. As
you can imaging it doesn't work good with template repeat method and I had
to create a "normal" workaround with polymer elements being reused when
scrolling.
I call the instances of the polymer element type used in the list for
"renderer"
the renderer that I'm using in the list have a "data" property that takes
an object with everything that should be displayed. So when a renderer is
reused it just moved and the data property set to the new data.
On "dataChanged" I set some observers, but some properties is also binded
with {{data.X}} notation in the renderers template.
So back to the problem (this is wrong way of doing it but it did raise the
"bug"):
Whenever I scrolled a renderer out of the screen I removed it from DOM and
when a new one got visible I added unused (or new) renderers to DOM again.
Then I set the renderer.data property.
Hovever, this way, the "dataChanged" event (and bindings) just get fired
the first time I set the renderer.data property, not any of the following
after a DOM remove/add cycle.
This seems strange to me. Sorry that I don't have an example.
(I did solve it by doing what I should have done from the beginning. Using
the css display:none/display:inline-block instead of DOM add/remove)
/David
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/a4b1bc09-5933-4348-86ef-97291493c327%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.