Skip to content

Instantly share code, notes, and snippets.

@ramboldio
Created May 24, 2017 15:36
Show Gist options
  • Save ramboldio/933a54b67a8a3f32cefc17b8bdbf089b to your computer and use it in GitHub Desktop.
Save ramboldio/933a54b67a8a3f32cefc17b8bdbf089b to your computer and use it in GitHub Desktop.
Polymer 1.0 Forced property update
You need to import lodash which allows you to deep copy objects and arrays easily.
You can also write your own deep copy code of course. :D
JS
--------------------------------------------------
_forceUpdate : function(property)
// set a deep-copy of product as product
this.set(property, _.clone(this.get(property)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment