Filemanager Dynamic Branches and Refresh

edited January 10 in Technical questions

Hi Webix team,

Here's one more question for you.

I have lots of cool functionality working but, when I navigate to a directory that requires a load from my server, the results are not shown immediately. I have to leave the directory and re-enter it to see the results.

Here's a snippet from my proxy:

$$("files").parse( webix.ajax().headers({ "Custom-Header":
    'version=1&action=dir&format=xml'}).get(localURL).then(function (data) {
var entry = new Object ();
entry.parent = parentDir.id;
entry.data = formatPath (data.xml (), true);
return entry; 
})

Here's a video screen capture of the problem:

https://www.dropbox.com/s/1aa25y9cg6x6ab1/webix-branch-refresh.mov?dl=0

As you can see, the state of the directory changes when the content loads, evidenced by the presence of the expansion arrow on select but, the data loaded to that path doesn't appear until I re-enter the directory a second time.

Seems like a simple oversight somewhere just not sure what to look for yet.

Thanks in advance.

Comments

  • edited January 11

    Hello,

    You can call the parseData method to parse the needed records and refresh the active folder at once:

    webix.ajax().get(url).then(function (data) {
        ...
        //parse and refresh active folder  
        $$("files").parseData(entry);   
    });

    http://webix.com/snippet/ae56736b

  • Perfect, Helga!

    Thank you for your support, I now have a fully functional Filemanager.

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!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion