Open anton-p-ivanov opened 9 years ago
@anton-p-ivanov To move node use prependTo()
, appendTo()
, insertBefore()
or insertAfter()
. Will update documentation about that.
@creocoder Why not add a convenience method for this which wraps up the necessary steps? Also, if you just call insertBefore()
with an existing node, will it get removed from the old location automatically?
@mikehaertl
Why not add a convenience method for this which wraps up the necessary steps?
Its already here.
if you just call insertBefore() with an existing node, will it get removed from the old location automatically?
Yes.
I see now. Awesome! :+1:
при appendTo как то слетают lft и rgt у ноды родителя и depth у дочерней ноды. никто подобного не замечал больше? только у меня так?
In Yii 1.x nested sets behavior there was methods for moving nodes inside tree, ex. moveAsLast(), moveAsFirst(). How to implement these methods in your Yii 2.x behavior?