Uploader files->onBeforeDelete

Hi.

How can i insert in the callback onBeforeDelete when deleting file, showing a confirm dialog. Problem is that confirm is a modal dialog, but is not stopping the returning function onBeforeDelete .

Actually i use the window.confirm function, but it’s not good looking.

Thanks for your help

Please check: https://webix.com/snippet/862b99f8

Confirmation has to be attached to the uploader’s DataStore (uploader.files.data)

Just FYI, you were completely right using a native confirmation. Webix modal boxes cannot replace native alert/confirm. They limit access to the UI (i.e. block user actions), but cannot prevent the code execution.

UPD.: However, “files->onBeforeDelete” works as expected. Can you please provide a snippet that will illustrate the issue?

https://webix.com/snippet/020ebd4d

confirmation can be used this way too:
https://webix.com/snippet/dfdc239c

Big thanks integral, it’s exactly what i want.

Thanks Listopad too :slight_smile: