Saulis / iron-data-table

iron-data-table is a Web Component for displaying data as a table or grid. Built on top of iron-list using Polymer.
Apache License 2.0
147 stars 66 forks source link

way to refresh or re-render a particular row? #187

Open dbanka opened 7 years ago

dbanka commented 7 years ago

I want to update the data and properties of a particular row only. How can I do that?

Saulis commented 7 years ago

Hi!

If you're using an items array, you can call table.set('items.0.foo', 'bar) (replace 0 with approriate item index) to update a particular property of a single item. Likewise, table.set('items.0', newItem) works also as long as the newItem is a new object.

With a function data source the same approach works, but you need to update using a private internal property _cachedItems instead of items