Git Product home page Git Product logo

Comments (2)

blasten avatar blasten commented on August 19, 2024

You need to use list.set('items.0.name', 'some value') to properly change the name of the 0th item.
http://jsbin.com/yayefe/edit?html,output

from iron-list.

ledoramy avatar ledoramy commented on August 19, 2024

I know about that and I'am using this method now - list.set('items.0.name', 'some value'), it's good when you know that you need to change only one property in object or your object consists from few fields . But if you have object which has 20 or more fields, and user can edit every field in this object or just few fields, and after editing he wants to see updated list.

To update item info I implemented it like these:

       var item = document.querySelector('#list').get('items.' + index);
        for(var arg in item) {
          document.querySelector('#list').set('items.' + index + '.' + arg, updatedObject[arg]);
        } 

And yes I used _refreshAll() method and it packed all iron-list items in one line whithout updating info from object fields.

And I think it's wrong behavior when model of iron-list which is items is updated but you can't see it in your list, becouse it continues to show old info.

from iron-list.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.