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

Lazy load for activateKey #27

Closed
jelovirt opened this issue Jun 18, 2013 · 2 comments
Closed

Lazy load for activateKey #27

jelovirt opened this issue Jun 18, 2013 · 2 comments
Milestone

Comments

@jelovirt
Copy link

When calling activateKey for a node that has not yet been loaded lazily, nothing happens as getNodeByKey doesn't find a node. Could a new feature be added that in this case Fancytree will make a lazy load operation to fetch the missing tree branch? If the convention will be to return a node source with all ancestor nodes and their siblings, the missing branch could added to the tree.

@mar10
Copy link
Owner

mar10 commented Jun 18, 2013

How would we know, what branch is the parent?
Maybe you can implement a sample function that solves your problem by sending an ajax request to the server and then uses what we have (tree. loadKeyPath(), .tree. applyPatch(), ...).
Then we can see if and how we can generalize it to add it to the core. I.e. what events should be triggered, what options should be available, etc.

@jelovirt
Copy link
Author

Read the code more after filing this issue and noticed I can implement the desired functionality with loadKeyPath. The only custom code I needed was to generate the key path based on the stable key scheme I was using. Closing this issue.

@mar10 mar10 added this to the 2.0.0beta milestone May 11, 2014
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