josdejong / svelte-jsoneditor

A web-based tool to view, edit, format, repair, query, transform, and validate JSON
https://jsoneditoronline.org
Other
814 stars 108 forks source link

feat: do not trigger onChange on programmatic changes #410

Closed josdejong closed 4 months ago

josdejong commented 4 months ago

This PR changed the behavior of the editor to NOT emit onChange events on programmatic changes. It will only emit onChange on user changes, similar to for example the HTML <input /> component. See: https://github.com/josdejong/svelte-jsoneditor/issues/318#issuecomment-1818817968.

This will make #145 irrelevant, and will partially resolve #318.

For reference: this behavior was introduced after a discussion in #128 via PR #134.

⚠️ THIS IS A BREAKING CHANGE⚠️