Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help, 'reloadChildren()' doesn't work. #324

Open
colinsanity opened this issue Dec 27, 2018 · 2 comments
Open

Need help, 'reloadChildren()' doesn't work. #324

colinsanity opened this issue Dec 27, 2018 · 2 comments

Comments

@colinsanity
Copy link

Hey guys, I've created a tree with children async loaded. But when I try to refresh one's children by using "reloadChildren()", the loading process hasn't been triggered.
Here's my code snippets :
Target node is formed like this :

{
   value: folderName,
   id: folderId,
   loadChildren: (callback) => {
      console.log('Load children for folder: ' + folderName);
      this.folderService.getCatalogSubFolder(this.catalogCode, child.folderId)
         .subscribe((res: any) => {
            if (res.success) {
               let folderData = res.data ? res.data : [];
               callback(res.data);
            }
         });
   }

The statement I call reloadChildren :
this.folderTree.getControllerByNodeId(folderId).reloadChildren();

I've debugged, the two ids are the same. Is there something I did was wrong ? Need helps, thanks in advance. T _ T

@colinsanity
Copy link
Author

And the 'Controller' I get is correct btw.

@Devp00l
Copy link

Devp00l commented Dec 20, 2019

Hm... Same problem here, the first time it works but when triggered multiple times it just stops working...

I now have to switch to another tree component (https://github.com/500tech/angular-tree-component), for my async tree, which isn't that flexible for providing css classes on a node level...
But where this functionality is used in another tree where no dynamic content is used.

It also seems like the development on this project has stopped :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants