json forms with recurse
HTML
<link rel="stylesheet" href="https://cdn.jsdelivr.net/brutusin.json-forms/1.6.3/css/brutusin-json-forms.min.css">
<script src="https://cdn.jsdelivr.net/brutusin.json-forms/1.6.3/js/brutusin-json-forms.min.js "></script>
<p>
Example taken from <a href="https://stackoverflow.com/a/34237219/310391">https://stackoverflow.com/a/34237219/310391</a> - this <a href="http://jeremydorn.com/json-editor/?schema=N4IgJgpgZglgdjALjA9nAziAXKAKgBQDkVJtRlEAbCbEA40gGnAnQGMAnGAB2TVvokazRAE9uNLCBQAjAFYQ2iEM24cUEjslZkQcAIYBbSeXGSQ6RFzgBzEAF9mbABYxKYDhDi6xE2vo4OfVEVECQIQ0wcEAASTyhaAGIAekhYBD4MZMFSezy85jjoJNToeCRULJyaeyAAA=&value=N4IgdghgtgpiBcIQBoQGMAWBLANgEwCcYwEBtAXQF8gAAA==&theme=bootstrap2&iconlib=fontawesome4&object_layout=normal&show_errors=interaction">works OK</a> in jeremydorn/json-editor but not in brutusin/jsonforms
</p>
Form should be here:
<div id="container">
</div>
See error console (Uncaught RangeError: Maximum call stack size exceeded)
JavaScript
var schema = {
"definitions": {
"TPNode": {
"title": "TPNode",
"description": "TPNode",
"type": "object",
"properties": {
"selector": {
"type": "string",
"required": true
},
"attributes": {
"type": "array",
"items": {
"title": "Attribute",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/TPNode"
}
},
"events": {
"type": "array",
"items": {
"title": "Event",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"handler": {
"type": "object"
},
"dependencies": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
},
"$ref": "#/definitions/TPNode"
};
var BrutusinForms = brutusin["json-forms"];
var bf = BrutusinForms.create(schema);
var data = {};
var container = document.getElementById('container');
bf.render(container, data);