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

How can I force Fancytree to render nodes with ext-table? #463

Closed
bpromasmb opened this issue Jul 6, 2015 · 2 comments
Closed

How can I force Fancytree to render nodes with ext-table? #463

bpromasmb opened this issue Jul 6, 2015 · 2 comments

Comments

@bpromasmb
Copy link

[This is copied from my StackOverflow question since I think this issue might be about more than just me not knowing how to use fancytree]

I have two fancytree tables, and I can drag a node from one tree to the other. Once I drag the node I dynamically add a set number of children to the dragged node, which all have input fields in the next column, rendered via renderColumn.

The problem I'm facing is that the columns are not showing in my HTML until I manually expand the dragged node, and I need to validate the input fields associated to the children.

I tried iterating node by node and forcing each to render individually:

visit_node.addChildren([
    //child nodes...
]);

visit_node.children.forEach(function(childNode){
    childNode.render(true);
});

but to no avail... Is there a way to force these nodes to render? Am I doing something wrong?

Currently I am manually calling setExpanded(true) followed by setExpanded(false) to force rendering, but this is causing performance issues.

EDIT: I have created a jsfiddle showcasing the issue.

Notice that when you drag a node from tree1 to tree2 3 children are created for each "final" folder, however, were I to submit my form without first expanding the folders, there would be no rendered <input> tags to validate. You can verify this by looking at the HTML by pressing F12.

@mar10
Copy link
Owner

mar10 commented Jul 20, 2015

The tree.render(true, true) method should create markup even for hidden nodes, but seems to have a bug. Will try to fix...

@bpromasmb
Copy link
Author

Just to add, the same issue affects cases in which I copy and paste a node. Even when the copied node has been rendered, the pasted node does not get rendered.

@mar10 mar10 closed this as completed in 7bcbe62 Jul 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants