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

Sorting a child to the top-most parent doesn't seem to work #1

Open
thatguychrisw opened this issue Jul 14, 2023 · 2 comments
Open
Labels
question Further information is requested

Comments

@thatguychrisw
Copy link

Trying to sort a child to the top most level doesn't seem to work as expected.

@marcantondahmen
Copy link
Owner

What is your configuration?

@marcantondahmen marcantondahmen added the question Further information is requested label Jul 15, 2023
@marcantondahmen
Copy link
Owner

Without more information I can only assume that it doesn't work due to the root level restriction. This restriction is enabled by default and can be removed as follows:

const tree = new SortableTree({
  nodes,
  element,
  lockRootLevel: false,
  stateId: 'state',
});

I also added an example to the demo page.

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

No branches or pull requests

2 participants