Commit 455f35a8 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Change the state value in place

This will prevent the input gadget to be changed if its parent call render with the same value (as ERP5 does in case of formulator error).
parent 26414999
......@@ -107,6 +107,11 @@
if (this.state.editable) {
result[select.getAttribute('name')] =
select.options[select.selectedIndex].value;
// Change the value state in place
// This will prevent the gadget to be changed if
// its parent call render with the same value
// (as ERP5 does in case of formulator error)
this.state.value = result[select.getAttribute('name')];
}
return result;
})
......
......@@ -97,6 +97,12 @@
<none/>
</value>
</item>
<item>
<key> <string>subject</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget HTML5 Select JS</string> </value>
......@@ -230,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.58742.58866.48708</string> </value>
<value> <string>963.62584.36941.22510</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1490622780.06</float>
<float>1516785191.79</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment