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

Unable to drag list item after removing/unchecking particular items. Need help. #3623

Open
abhijitv2 opened this issue Mar 25, 2024 · 0 comments

Comments

@abhijitv2
Copy link

Hello!

I am using react-dnd library to implement drag n drop effect.
I have a normal flow as shown, and user can reorder the flow by rearranging them and whichever step user does not want to include in the flow, he/she can exclude it by unchecking it.

Till here, everything works fine, but when I uncheck second and third step, and then if I drag the first step on the top to the bottom step then it does not allow/ does not drop the first step to the bottom of the active flow.

little but about my code: I have an array of objects where each object has a field 'checked' which is true initially to indicate all the steps are included in the flow. Once I uncheck a step from the flow, I update its checked value to false and move it to inactive step array. Hence, the initial array of object remains the same, I only separate it basis on the checked value.

I need help to resolve this issue as I am new to react-dnd.

Kindly visit link : https://stackblitz.com/edit/vitejs-vite-latb4r?file=src%2FApp.jsx

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