Created
May 24, 2017 15:36
-
-
Save ramboldio/933a54b67a8a3f32cefc17b8bdbf089b to your computer and use it in GitHub Desktop.
Polymer 1.0 Forced property update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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