hello-pangea / dnd

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

Error: Invariant failed: Cannot find droppable entry with id #421

Open Merynek opened 2 years ago

Merynek commented 2 years ago

Cannot use virtualized list for Droppable elements. On my project I use lot of this Droppable zones in list, so I need virtualization. But its not supported right now. I think that its quick fix. Just add boolean in props which create Dropable zones during drag. Its bad for performance but its up to you if you want this. Please add this boolean for enable/disable this feature. Thanks

100terres commented 1 year ago

Hi @Merynek,

Could you also provide us a real example of the issue you are facing using something like CodeSandbox.

Thank you.

Merynek commented 1 year ago

Ok here is example:

<Groups>
   <Group>
      <Item>1</Item>
      <Item>2</Item>
      <Item>3</Item>
   </Group>
   <Group>
      <Item>1</Item>
      <Item>2</Item>
      <Item>3</Item>
   </Group>
   <Group>
      <Item>1</Item>
      <Item>2</Item>
      <Item>3</Item>
   </Group>
</Groups>

When you virtualize these groups, and try drag item1 from group1 you got this error. Why? Bcs durring drag you dont render Dropable. Its bcs of performance probably. So I want prop for enable these creating dropable durring drag. Default false, for me true :-) Thanks :-)

100terres commented 1 year ago

Hi @Merynek :wave:

Thank you for the additional information you've provided, but it would help us to help you if you could also provide a real and live example of the issue you are facing. You can use CodeSandbox for this :slightly_smiling_face:

Merynek commented 1 year ago

Here is example: https://codesandbox.io/s/nice-shaw-60998u?file=/src/index.tsx

Just drag first item and try move him to another group :-)

Merynek commented 1 year ago

@100terres any idea? Just add boolean for disable it? Not good for performance but better for support Virtualized lot of Dropable zones

max-orca commented 11 months ago

@Merynek Hey, did you find a solution?

Merynek commented 11 months ago

@Merynek Hey, did you find a solution?

no, I still waiting for add my solution in project.

Prains commented 1 day ago

looking for solution too