Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue moving tree item to different level when no other children present #101

Open
rhaazy opened this issue Dec 1, 2022 · 0 comments
Open

Comments

@rhaazy
Copy link

rhaazy commented Dec 1, 2022

I have this scenario:

I have a tree with 3 nodes, Node A, Node B, Node C
Node A has 0 Child Nodes.
Node B has 1 Child Node.
Node C has 2 Child Nodes.

I have validation set up that says a Child Node cannot be moved into the position of a root level node. (IE. Node B's child node cannot be in the same level as Node A,B,and C.)

You are able to reorder the root level nodes, so..
A
B
C

can become

C
B
A

no problem so far...

I do this validation in the confirmChange callback by returning false if destination of child node is null.

I can move a child node from one parent to another, so I could move Node B's child to be a child of Node C instead.
The problem is that if I try to move a child node to be a child of Node A I cannot.

Because Node A does not already have a child, I am unable to move any node into the child position under this root level node because it seems that you are forced to move the node into the root position first, then slide it over into the child position...

Has anyone else experienced this issue and is there a work around?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant