Commit 946e66f5 authored by Boris Kocherov's avatar Boris Kocherov

[erp5_json_form] update from https://lab.nexedi.com/bk/rjs_json_form

parent 0de55a2c
...@@ -994,8 +994,12 @@ ...@@ -994,8 +994,12 @@
}) })
.declareMethod('rerender', function (opt) { .declareMethod('rerender', function (opt) {
var g = this, var g = this,
gadget, gadget = g.props.form_gadget,
queue = RSVP.Queue(); queue = RSVP.Queue();
opt = opt || {};
if (!opt.scope && !opt.path) {
opt.schema = opt.schema || g.state.schema;
}
if (opt.scope) { if (opt.scope) {
queue queue
.push(function () { .push(function () {
...@@ -1022,11 +1026,8 @@ ...@@ -1022,11 +1026,8 @@
return gadget.getContent(); return gadget.getContent();
}) })
.push(function (value) { .push(function (value) {
return gadget.rerender({ opt.value = value;
schema: opt.schema, return gadget.rerender(opt)
value: value,
ignore_incorrect: opt.ignore_incorrect
})
.push(function () { .push(function () {
if (gadget.props.changed.length > 0) { if (gadget.props.changed.length > 0) {
value = undefined; value = undefined;
......
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