Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to track changes in the editor #139

Open
gitsunny404 opened this issue Mar 5, 2024 · 1 comment
Open

Not able to track changes in the editor #139

gitsunny404 opened this issue Mar 5, 2024 · 1 comment

Comments

@gitsunny404
Copy link

 <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.

@mariohmol
Copy link
Owner

Is this the same as #94 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants