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] - The drag and drop is working only once if the columns are updated. #5793

Open
2 tasks done
TeoAvignon opened this issue Nov 5, 2024 · 0 comments
Open
2 tasks done

Comments

@TeoAvignon
Copy link

TeoAvignon commented Nov 5, 2024

TanStack Table version

v8.20.5

Framework/Library version

18.3.1

Describe the bug and the steps to reproduce it

If we need to recompute the columns (ie with dependencies in the columns useMemo), the DnD of the rows is working only once.

Here is a forked stackblitz from your demo. It reproduces the bug where I just change the dependencies of the useMemo is order to simulate dynamic columns.
Image

I can make the code work by isolating the action column and adding its reference directly in the dynamic columns' useMemo, but it would be nice not to have this trick.

Image

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://stackblitz.com/edit/github-pcxwxh?file=src%2Fmain.tsx

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
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