hello-pangea / dnd

Beautiful and accessible drag and drop for lists with React.
https://dnd.hellopangea.com
Other
2.06k stars 87 forks source link

DND on table - React 18, NextJs, hello-pangea 16.3 #704

Closed Jmyerzzz closed 10 months ago

Jmyerzzz commented 10 months ago

I am trying to create dnd'able rows in a table that is populated by and API. I am able to select and drag a row, but don't see rows float to new position as I drag row across droppable region. When I drop the row I get an error saying cannot read property of undefined for one of the values fetch from the API for that row.

First screenshot is what the table body looks like. One row with a username that is not a draggable. The remainder of the rows below that, up until the next user, are draggable elements (only one shown). And totals data in a subsequent row that is not a draggable.

Second screenshot is the error after dropping a row.

Screenshot 2023-10-25 at 10 03 29 PM Screenshot 2023-10-25 at 10 11 26 PM