Commit 7d2a4d98 authored by Boris Kocherov's avatar Boris Kocherov

make rerender work without options

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