diff options
author | Leif Åstrand <legioth@gmail.com> | 2017-03-01 09:16:25 +0200 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2017-03-01 09:16:25 +0200 |
commit | c21c5526b147aad1d77c2a9bc87828fb26798ea4 (patch) | |
tree | 47ca52c8baaaa469d4feea811c75a2cb03b0f158 /client | |
parent | abc26cb38d790e9fc0b97720164f855ed7b4dc7b (diff) | |
download | vaadin-framework-c21c5526b147aad1d77c2a9bc87828fb26798ea4.tar.gz vaadin-framework-c21c5526b147aad1d77c2a9bc87828fb26798ea4.zip |
Fix js state partial updates (#8695)
* Fix partial state change handling of JavaScript components
In ace0e324b69753431dcde9949eaa9b0e3e648db9 (Use diffstate for JS connectors)
partial state change handling for JavaScript components was introduced, but the
setNativeState method in JavaScriptConnectorHelper was not adjusted.
By removing the cleanup code from the updateNativeState method it can
be ensured that the non-changed properties are still present on the state object.
* Add test for preserving untouched JS state fields
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java b/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java index 1d4939f40d..7f4b1b6759 100644 --- a/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java +++ b/client/src/main/java/com/vaadin/client/JavaScriptConnectorHelper.java @@ -396,12 +396,6 @@ public class JavaScriptConnectorHelper { JavaScriptObject input) /*-{ // Copy all fields to existing state object - for(var key in state) { - if (state.hasOwnProperty(key)) { - delete state[key]; - } - } - for(var key in input) { if (input.hasOwnProperty(key)) { state[key] = input[key]; |