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
Then I modified the loadBranch function like that :
loadBranch: function (node, rows) {
//...
if (node == null) { // Inserting new root nodes
if (settings.prependRootNodes)
this.prepend(rows);
else
this.append(rows);
} else {
var lastNode = this.data("treetable").findLastNode(node);
rows.insertAfter(lastNode.row);
}
//...
}
Of course this isn't the only way to go at it. My first idea was to add a parameter to loadBranch that would tell the function to append at the top only for this load request.
In any cases both options wouyld be nice to have in the core plugin. I hope this is helpfull :)
The text was updated successfully, but these errors were encountered:
Nejaa
changed the title
Add option to append nodes at top.
Add option to append nodes at top. [PR request pending]
Nov 16, 2017
EDIT : See PR request
I had this need lately. I made it work by adding a non core parameter to the options :
Then I modified the
loadBranch
function like that :Of course this isn't the only way to go at it. My first idea was to add a parameter to loadBranch that would tell the function to append at the top only for this load request.
In any cases both options wouyld be nice to have in the core plugin. I hope this is helpfull :)
The text was updated successfully, but these errors were encountered: