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 :)
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 :)