I want to add a warning before the user deletes a folder, because it will then delete everything inside of the folder.
This doesn’t work:
webix.confirm({
title: "Alert",
text: "Are you sure you want to this folder? \
\
This will delete everything inside this folder.",
type:"confirm-error"
}).then(function(result){
model.remove({target: id}, (d)=>{
console.log(id);
webix.$$("ss_files").remove(id);
webix.$$("ss_files").deleteFile(id);
});
})
It triggers onBeforeDelete
so then this fires again, but removing the deleted file from the datastore with webix.$$("ss_files").remove(id)
doesn’t work, so it just goes in a loop.
Any ideas on how to solve this?
here is a snippet - https://snippet.webix.com/0bcu44j1