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

toArray adds one extra item #37

Open
ltdev22 opened this issue Jan 26, 2015 · 1 comment
Open

toArray adds one extra item #37

ltdev22 opened this issue Jan 26, 2015 · 1 comment

Comments

@ltdev22
Copy link

ltdev22 commented Jan 26, 2015

Hi I'd like to ask a question please.

I'm using the nestedSortable plugin in order to move nodes in my tree. My tree looks like this http://ftp.nchu.edu.tw/MySQL/tech-resources/articles/hierarchical-data-4.png , so my root node (Electronics) has always left == 1 and right == 20 (or any max value). When I hit my 'save' button the toArray returns one extra item (supposed as root) and breaks my tree structure, i.e. it gets the left and right values of my root (Electronics) and my root becomes a child node.

How can I fix this, so that the extra item of the toArray will get always the same left and right values as my root and don't brake the tree?

@twicejr
Copy link

twicejr commented Apr 7, 2015

I think this is not a big problem, and will likely break existing websites that use it as is, currently.
Maybe I'm a bit too pessimistic here, but i.m.o., a version 2 must fix these problems.
Can you not fix it in your backend?

Maybe I will do an attempt on a version 2.0 in the future.
I'm not the project owner though ;)

@see https://github.com/jquery/jquery-ui/blob/master/ui/sortable.js as well.

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

2 participants