Filemanager : add child directory on demand in directory hierarchy

Hi webix team,

I am using filemanager component in webix 7.2.

I want to add child directories in directory hierarchy view on demand.

can you please tell me what function i need to ovverride?

is files(),and folders() function need to ovveride or there is another function to get child node?

Please reply!

please reply

By default, it is expected that you retrieve the full folder structure. However, depending on the backend implementation it is possible to override the local methods responsible for folder loading. In a way, you can indeed imitate dynamic folder loading. For instance, here is how this structure could look like:

  1. In the case your backend returns only the top level of your folder structure, you will have to override the folders() methods of the Backend and LocalData services accordingly (in a way that returns only the top hierarchy level).
  2. Every time an item is selected you will have to call the newly overridden folders() method of the LocalData service.
  3. Both of the services’ folders methods will need some extra logic to handle requests for the folders located inside.

The overall implementation could look something like this: Code Snippet