Comments (2)
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.
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)
- Working with ionic? HOT 1
- Plans for reimplementing this based on lit-element? HOT 10
- Successor based on lit-element HOT 1
- display items in a horzontal iron-list HOT 1
- Iron-collapse and iron-list HOT 1
- Incomplete list in FF and odd scrolling HOT 2
- Focus doesn't restore correctly after focused item is scrolled off screen. HOT 1
- Changing focused item with up arrow can cause the outer scroll to scroll up
- iron-list is incompatible with Polymer policy of stripping template contents HOT 3
- iron-list doesn't allow the user to <TAB> through all contents. HOT 1
- Demos are all broken because data/contacts.json 404s HOT 2
- selection changes - not easy to distinguish user-caused vs code-caused
- Set `selected-item` and `selected-items` does not trigger the selected prop
- Some implementation or virtual-scroller or iron-list for litElement? HOT 2
- How to implement lazy-loading in typescript?
- Results set does not clear with empty array and computed binding HOT 1
- Update iron-list to use newer Templatize library
- Physical items can grow unbounded when scrolling heterogeneously-sized list
- Focus jumps to first element when bound data changes HOT 2
- Cannot set vertical margin between the items in the iron-list.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iron-list.