Create folder in first lvl of tree

Hi, I´ve been looking how to create a folder but in the first level of the tree, cuz' the function only creates a folder inside of an existent folder

Comments

  • Hey @Dalaz, please take a look at this example - https://snippet.webix.com/8ysblucg.
    I've included 2 ways you can add the root folder: first one is via the button at the bottom, second one is called by right clicking on the root folder and selecting the right option i nthe context menu. Second option is the recommended option in this case.
    Please note the way the context menu is implemented, you can read more here. It is recommended you implement the menu with batch: "root" property.
    Also please note that by using the add method file manager handlers will ignore the newly created folder, but you can still use save to define the paths for your file operations. Alternatively, you can use webix.ajax to get the required data(like id, folders place, its name) and pass the parameters to our add method.

  • thanks, I can work with that

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion