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
The current implementation does not provide the ability to rearrange the order of the children, which is used for instance in traversing the tree. I have not found a proper way to reorder children, without detaching and reattaching nodes, which causes all the __detach and __attach to be trigerred.
Would it be possible to improve the implementation to be able to work on the children list without triggering detach and attach, as long as the set(children) stay stable?
Things I would like to be able for instance includes: node.children = sorted(node.children, lambda node: node.weight), or alternatively sort(node.children).
The text was updated successfully, but these errors were encountered:
Yes it is possible. I need to adapt the implementation. Not triggering the detach and attach hookups on a pure order change, is some kind of API change. Will think about it, but is not a big deal.
The current implementation does not provide the ability to rearrange the order of the children, which is used for instance in traversing the tree. I have not found a proper way to reorder children, without detaching and reattaching nodes, which causes all the __detach and __attach to be trigerred.
Would it be possible to improve the implementation to be able to work on the children list without triggering detach and attach, as long as the set(children) stay stable?
Things I would like to be able for instance includes: node.children = sorted(node.children, lambda node: node.weight), or alternatively sort(node.children).
The text was updated successfully, but these errors were encountered: