Skip to content

Not able to track changes in the editor #139

Open
@gitsunny404

Description

@gitsunny404
 <json-editor
                  [options]="editorOptions"
                  [data]="schemaJsonData"
                  (change)="getDataFromJsonEditor($event)">
 </json-editor>

this is how i want to keep track on of the changes in the editor on change method

getDataFromJsonEditor(ev?: any) {
    console.log("full value##########", ev)
    if (ev && typeof ev === 'object' && !('isTrusted' in ev)) {
      console.warn("### data received for the change in the json editor ### :", ev);
      this.updatedSchemaJsonData = ev;
    }
  }

this is my method actually where I am using this for the page where I am getting the data and updating it.

The issue is when I do the changes for the first update the change event get tracked and emit successfully and when i submit the data and try to update the data once again the change event do not emit and get tracked.

What can be the issue. I have tried it for the normal input box and my methods are working fine.
Can anybody help to keep track of the latest changes. I have tried the OnChange method from the editor option as well that is also not working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions