You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to have an enumSource reference an API which pulls the list of items. Each item in the list contains a schema of its own. Upon change, I would like to append to the select box, the schema that they have chosen to allow the user to enter values for it. I have updated my jsoneditor code with the following pull request: #720 and made my own changes. Now, on the onChange portion of the select, I have the following:
onInputChange: function() {
var val = this.input.value;
var editor = this.jsoneditor.getEditorClass(this.enumSource[0].source[val].schema);
var ret = this.jsoneditor.createEditor(editor,{
jsoneditor: this.jsoneditor,
schema: this.enumSource[0].source[val].schema,
container: this.container,
path: this.path,
parent: this
});
ret.preBuild();
ret.build();
ret.postBuild();
This successfully pulls the schema of the item and appends to the select box, however it is not updating the global json editor with the new schema I've added. It only contains the select box but not the item I have chosen. How can I register this such that the item's schema I have selected is also included into the global schema?
Thank you
Cheers,
TJ
The text was updated successfully, but these errors were encountered:
Hi All,
I would like to have an enumSource reference an API which pulls the list of items. Each item in the list contains a schema of its own. Upon change, I would like to append to the select box, the schema that they have chosen to allow the user to enter values for it. I have updated my jsoneditor code with the following pull request: #720 and made my own changes. Now, on the onChange portion of the select, I have the following:
This successfully pulls the schema of the item and appends to the select box, however it is not updating the global json editor with the new schema I've added. It only contains the select box but not the item I have chosen. How can I register this such that the item's schema I have selected is also included into the global schema?
Thank you
Cheers,
TJ
The text was updated successfully, but these errors were encountered: