filemanager onBeforeCreateFolder - id != newly created folder

Hi, looking at documentation the ID of the “onBeforeCreateFolder” event should return the ID of the newly created folder. However, i am getting the ID of the currently selecteditem.
please see http://webix.com/snippet/b7c64745

also - with the createFolder method is there a way to retrieve the ID of the newly created folder?

please let me know what i am doing wrong

fyi - just a note - according to the documentation the “onBeforePasteFile” passes as a parameters a list of ids to paste. It is actually the id of the destination folder to copy the items to.

also - got around the above issue “onBeforeCreateFolder” event giving the ID of the newly created folder by attaching to the OnBeforeAdd event for the TreeStore.

Hi,

There is an issue in our docs. Handlers of all onBefore{action} events take selected file/folder as a parameter. We will correct the documentation.

giving the ID of the newly created folder by attaching to the OnBeforeAdd event for the TreeStore

Great solution!. But possibly it would be more correct to get id after data are saved and response received (the id can be changed):

$$("files").attachEvent("onSuccessResponse", function(data){
   if(data.action == "create"){
       var oldId = data.source;
       var newId = data.id;
   } 
});

thanks for the reply