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

Keep the card order when dragging to another column #48

Open
aislanmaia opened this issue Jun 8, 2020 · 3 comments
Open

Keep the card order when dragging to another column #48

aislanmaia opened this issue Jun 8, 2020 · 3 comments

Comments

@aislanmaia
Copy link

When I try to drag the cards, they go to the top of the column. So how to keep them in the exact place where they got dropped ?

@mihaiphilip
Copy link

Similar issue here:
I move the task to other status, but after the "drop" and "update-block" events are triggered, the task moves up or down inside the new column. Moving the task inside the same status works fine.
The same issue is happening to the demo also on both chrome and firefox: https://vue-kanban.netlify.app/
This is a big issue, since the order is very important for my use case.

@mihaiphilip
Copy link

I noticed that the task moves up or down because the tasks are sorted by ID after the drop event finishes.
We need to prevent this sort from happening...
Hope this detail helps.

@mihaiphilip
Copy link

Ok,
Seems that the tasks are reordered because we update the task's object "status" property in the updateBlock() function.
We must update it for consistency, but we need to sort the tasks in the getBlocks(status) function according to a new property "position" which has to be updated according to the position from list.

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