EasyUI Forum

General Category => Bug Report => Topic started by: Stefan B. on January 24, 2014, 05:44:02 AM



Title: Tree error on insert a node after some other node
Post by: Stefan B. on January 24, 2014, 05:44:02 AM
Is this a bug? I'am get a node from a tree, remove the node from tree and then insert the same node data at other position in the tree (not at the end of the tree). After that, the node data is added to the end of the roots tree data. I fetch the tree data with the methode 'getRoots'. Should the note data set at the correct position. On a previous version of EasyUi it works. We use the newst version of EasyUi

Code:
var selectedNode = selectedNode();
var otherNode = findOtherNode();
var newNodeReportFieldsData = [{
id: selectedNode .id,
text: selectedNode .text,
checked: true
}];

$('#reportFieldsTo').tree('remove', selectedNode.target);
$('#reportFieldsTo').tree('insert', { after: otherNode.target, data: newNodeReportFieldsData });


Title: Re: Tree error on insert a node after some other node
Post by: Stefan B. on January 24, 2014, 06:03:09 AM
I found the bugfix solution on this post: http://www.jeasyui.com/forum/index.php?topic=2806.0 (http://www.jeasyui.com/forum/index.php?topic=2806.0)