summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <legioth@gmail.com>2017-03-01 09:16:25 +0200
committerHenri Sara <henri.sara@gmail.com>2017-03-07 15:43:00 +0200
commit2c8603654a0b68f87922f75390d28e8001bfc436 (patch)
tree3d12ed7fc986bda8fbb75ab12b3d628307964f5c /client
parentb7cf84c0db68d9116f402607ddcba4ad4215995d (diff)
downloadvaadin-framework-2c8603654a0b68f87922f75390d28e8001bfc436.tar.gz
vaadin-framework-2c8603654a0b68f87922f75390d28e8001bfc436.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.java6
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];