Commit 00f99934 authored by Boris Kocherov's avatar Boris Kocherov

rerender accept schema option now

parent 534133b9
......@@ -1987,10 +1987,10 @@
delete_button: options.delete_button,
top: options.top
};
return g.rerender(options.document);
return g.rerender({value: options.document});
})
.declareMethod('rerender', function (document) {
.declareMethod('rerender', function (opt) {
var g = this,
for_delete,
root = g.element.querySelector('[data-json-path="/"]');
......@@ -2003,8 +2003,11 @@
root = g.element;
}
for_delete = Array.from(root.childNodes);
if (opt.schema) {
g.props.schema_arr[0].schema = opt.schema;
}
return render_field(g, g.props.property_name, "", g.props.schema_arr,
document, root, g.props.render_opt)
opt.value, root, g.props.render_opt)
.push(function () {
for (var i = 0; i < for_delete.length; i += 1) {
root.removeChild(for_delete[i]);
......
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