googlearchive / core-list

Polymer virtualized list element
25 stars 20 forks source link

list rows don't completely update all bindings #62

Open drewp opened 9 years ago

drewp commented 9 years ago

https://bigasterisk.com/post/core-list-update-demo.html on chrome 41.0.2251.0 looks like https://bigasterisk.com/post/core-list-update-demo1.png

The top sample doesn't update right at all. The middle one (which requests index for each row) works as expected. The bottom one, with index and also an inner polymer element, draws its indices right but doesn't notify the inner element. If I inspect one of the stale element (like !20!) and ask for "$0.model" in the js console, the display corrects itself and shows !496!. I'm reading $0.model, not writing anything to it.

drewp commented 9 years ago

I think a workaround is to add a dependency on 'index' in the expression:

    <demo-bang model="{{(index + 1) && model}}">
jeroldangarcia commented 9 years ago

incredible but true! thanks

robdodson commented 9 years ago

I noticed it also works if you give an attribute to any element you want to repeat in the list.

ex:

<template>
  <div data-foo="{{index}}">{{model.name}}</div>
</template>
robzen commented 9 years ago

the workaround doesn't work if you use the fade attribute on the core-image element

valera-rozuvan commented 8 years ago

Any chance of this being fixed soon? What's the reason behind this bug? Can someone point me in the right direction where to look in the source?

notwaldorf commented 8 years ago

This element is deprecated and no longer maintained, so it's not likely anybody is looking at it. We recommend updating your app to Polymer 1.0, and checking out the new iron-list element there: https://github.com/polymerelements/iron-list