You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried both with $.Deferred() and ES6 Promise, but when promise is resolved no postProcess function is called.
Instead using Ajax requests the behaviour is correct.
Here are examples of my code:
lazyLoad: function(event, data) {
var path = data.node.data.path;
// 1) Ajax is working correctly
data.result = {
url: "/api/listDirsRec?path="+path,
};
// 2) $.Deferred not working
var defer = new $.Deferred();
data.result = defer.promise();
files.listDirsRec(path, function(resp) {
defer.resolve(resp);
});
// 3) ES6 Promise not working
data.result = new Promise(function(resolve, reject) {
files.listDirsRec(path, function(resp) {
resolve(resp);
});
});
},
postProcess: function(event, data) {
// never called after lazy load
},
The text was updated successfully, but these errors were encountered:
I'm trying to lazyloading children nodes following this tutorial:
https://github.com/mar10/fancytree/wiki/TutorialLoadData#use-a-deferred-promise
I've tried both with $.Deferred() and ES6 Promise, but when promise is resolved no postProcess function is called.
Instead using Ajax requests the behaviour is correct.
Here are examples of my code:
The text was updated successfully, but these errors were encountered: