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

dnd create infinite loop on Drag And Drop #384

Open
Naspo88 opened this issue Jan 26, 2021 · 1 comment
Open

dnd create infinite loop on Drag And Drop #384

Naspo88 opened this issue Jan 26, 2021 · 1 comment

Comments

@Naspo88
Copy link

Naspo88 commented Jan 26, 2021

I'm using the library to make able my table to drag and drop columns and reorder them.

Lately, I found an issue that seems like happen even in your example so potentially there is space of improvement or at least discussion on how to solve.

I found out that if I have a really small column next to a larger one. When I try to move the smaller after the larger it triggers a long loop of onMove action and the table start to flick. To show better the issue see the gif:

calendar

Please let me know if you can see this behaviour in similar cases.

This from your example:

calendar

@bebraw
Copy link
Member

bebraw commented Jan 26, 2021

Hi,

I haven't touched the drag and drop related code in over two years so likely the dependencies are somewhat out of date.

I think I know the cause of the issue, though. Since the columns happen to have different widths, after it has completed the initial operation, there's overlap again that's triggering the logic ad infinitum. To solve, maybe some additional logic would be needed in some appropriate place.

Note that I'm not maintaining the library actively as there's close to zero commercial demand for it and I still have my bills to pay but i'm happy to receive a PR and get the fix published if you want to work on it.

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