Manually adding an empty folder to a treetable

Is there a way to add an empty folder to a treetable? In the following snippet, I would like the second item, that is added later, to include a folder icon, not a file icon. Is there a good way to do it?

Hello @hinatoy,

You can customize a type property:

         if (obj.$count &&
           return "<div class='webix_tree_folder_open'></div>";
         else if(obj.$count || obj.type == "folder")
           return "<div class='webix_tree_folder'></div>";
         return "<div class='webix_tree_file'></div>";

Please, check out the snippet with example: Code Snippet

1 Like

Thank you very much! I’ll use the solution offered!

1 Like