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

StatefulTable Drag and Drop not Working #1575

Open
arcticpete opened this issue Oct 25, 2024 · 3 comments
Open

StatefulTable Drag and Drop not Working #1575

arcticpete opened this issue Oct 25, 2024 · 3 comments
Labels
need more info Issue author needs to provide more info

Comments

@arcticpete
Copy link

arcticpete commented Oct 25, 2024

Describe the bug
The drag and drop feature does not work in current React 18 because of a deprecated library react-beautiful-dnd. It looks like this could be replaced with a working [@hello-pangea/dnd](https://stackoverflow.com/questions/75124430/react-beautiful-dnd-warning-defaultprops-will-be-removed)
To Reproduce
Steps to reproduce the behavior:

  1. use the example located at https://developer.bigcommerce.com/big-design/statefulTable
  2. attempt to drag and drop
  3. open warnings console
  4. See error

Expected behavior
drag and drop should work

Screenshots
Screenshot 2024-10-25 at 3 56 41 PM

Desktop (please complete the following information, if applicable):

  • OS: Mac os
  • Browser Chrome
  • React 18
@chanceaclark
Copy link
Contributor

Hey @arcticpete,

We will eventually move over to https://github.com/atlassian/pragmatic-drag-and-drop as per Atlassians deprecation notes: atlassian/react-beautiful-dnd#2672

In regards to these warnings you are receiving, I have been unable to reproduce it locally or on the documentation site. Would you mind providing a CodeSandbox reproduction so we can look into it more?

@chanceaclark chanceaclark added the need more info Issue author needs to provide more info label Oct 28, 2024
@david-vloedman
Copy link

david-vloedman commented Nov 20, 2024

Hey @arcticpete ,

I just wanted to comment that I also ran into this issue and was able resolve it by removing react strict mode.

The fix was found in the react-beautiful-dnd issues: atlassian/react-beautiful-dnd#2407

Cheers,
David

@pvaladez
Copy link

Hey @chanceaclark,

Here's a codesandbox reproducing the issue when <React.StrictMode> is used. The issue can also fixed by commenting out the strict mode elements.

https://codesandbox.io/p/devbox/bigdesign-draggable-table-issue-22kvds

It looks like people on the linked issue above were able to use hello-pangea/dnd as a direct drop-in replacement for react-beautiful-dnd... it's apparently a maintained fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Issue author needs to provide more info
Development

No branches or pull requests

4 participants