Dynamic loading of folders in File Manager

I need to load the folders in the File Manager component dynamically and the example at https://docs.webix.com/filemanager__howto.html#loadingfoldersdynamically is a pretty poor solution since

  1. For some unknown reason the example seems to work with local client data
  2. The folder view will not show the “expand” symbol for folders containing subfolders until the folder has been selected. The expand symbol is a visual indicator for a user that there is subfolders and the user shall not be forced to click each folder to be informed if there’s subfolders!

I can easily include a boolean value in the server response that indicates that a folder has subfolders but I have no clue how this should be handled correctly in the File Manager component.

Any suggestions for a better solution for lazy loading folders with the File Manager is greatly appreciated.