Fix history (undo/redo) being cleared in mode `code` and `text` after transforming or sorting
This commit is contained in:
parent
9e9fd72edd
commit
42672eeef5
|
@ -9,6 +9,8 @@ https://github.com/josdejong/jsoneditor
|
|||
Transform modal. New options `createQuery`, `executeQuery`, and
|
||||
`queryDescription` are available for this now. An example is available
|
||||
in `examples/23_custom_query_language.html`. See #857, #871.
|
||||
- Fix history (undo/redo) being cleared in mode `code` and `text` after
|
||||
transforming or sorting.
|
||||
|
||||
|
||||
## 2020-01-25, version 8.4.1
|
||||
|
|
|
@ -408,14 +408,14 @@ textmode._showSortModal = function () {
|
|||
const sortedJson = sort(json, sortedBy.path, sortedBy.direction)
|
||||
|
||||
me.sortedBy = sortedBy
|
||||
me.set(sortedJson)
|
||||
me.update(sortedJson)
|
||||
}
|
||||
|
||||
if (isObject(json)) {
|
||||
const sortedJson = sortObjectKeys(json, sortedBy.direction)
|
||||
|
||||
me.sortedBy = sortedBy
|
||||
me.set(sortedJson)
|
||||
me.update(sortedJson)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ textmode._showTransformModal = function () {
|
|||
executeQuery,
|
||||
onTransform: query => {
|
||||
const updatedJson = executeQuery(json, query)
|
||||
this.set(updatedJson)
|
||||
this.update(updatedJson)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue