This commit is contained in:
parent
8384c115c6
commit
0012bb2acc
|
@ -63,9 +63,10 @@ function editor(root, inputData, options) {
|
|||
});
|
||||
}
|
||||
|
||||
function saveTree(from) {
|
||||
function saveTree(from, opt) {
|
||||
opt = _.merge({force: false}, opt)
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (store.hasChanged()) {
|
||||
if (opt.force || store.hasChanged()) {
|
||||
resolve(store.tree(from))
|
||||
store.clearChanged()
|
||||
}
|
||||
|
@ -83,7 +84,7 @@ function editor(root, inputData, options) {
|
|||
let id = item.attr('data-id')
|
||||
|
||||
if (opt.recursive) {
|
||||
return saveTree(id)
|
||||
return saveTree(id, {force: true})
|
||||
}
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user