Angular4-JsonEditor
Angular4-JsonEditor copied to clipboard
'Tree' option is always shown on open
I've have the following editorOptions
this.editorOptions = new JsonEditorOptions();
this.editorOptions.modes = ['view', 'code']; // set all allowed modes
It looks like when opening the Editor it's always set to 'Tree' mode. When checking the dropdown it only shows 'View' and 'Code'. So I think there's something wrong with the filtering on initialization?
@elsticky I got the same issue, and I have a workaround for this:
when you set a list of allowed modes, you also can set the current mode:
this.editorOptions = new JsonEditorOptions();
this.editorOptions.modes = ['view', 'code']; // set all allowed modes
this.editorOptions.mode = 'view';
and view mode is "view" on opening