EasyUI Forum

General Category => General Discussion => Topic started by: hahamed on February 01, 2016, 02:38:28 AM



Title: Parent of source argument OnDrop is null (tree)
Post by: hahamed on February 01, 2016, 02:38:28 AM
Hello, my code is:
Code:
onDrop: function (target, source, point) {
    var parent = $(this).tree('getParent', source.target);
    // parent become null

Why parent become null?
thanks


Title: Re: Parent of source argument OnDrop is null (tree)
Post by: jarry on February 01, 2016, 06:43:13 AM
The onDrop event fires after a node is dropped. The source  node has been moved. You can not access it by .target property. To get the moved node, please call find method with the id value of the special node.


Title: Re: Parent of source argument OnDrop is null (tree)
Post by: hahamed on February 01, 2016, 09:20:03 PM
The onDrop event fires after a node is dropped. The source  node has been moved. You can not access it by .target property. To get the moved node, please call find method with the id value of the special node.

very thanks