React-beautiful-dnd: Drop Target Incorrect When Combine is Enabled

Created on 3 Oct 2019  ·  7Comments  ·  Source: atlassian/react-beautiful-dnd

Expected behavior

Only populate snapshot.combineTargetFor when appropriate

Actual behavior

Opposite of expected, though intermittent.

Steps to reproduce

  1. start with your own demo here: https://react-beautiful-dnd.netlify.com/?path=/story/single-vertical-list--with-combine-enabled
  2. Take the second to last element and drag it below and out of the context. Intermittantly when you come back up, the final element will have a snapshot.combineTargetFor even though the source isn't over or really near it. This take a little bit of playing with the throw it off. Maybe two or more times and coming back into the context from the side.

Suggested solution?

🤷‍♂

What version of React are you using?

16.8.6

What version of react-beautiful-dnd are you running?

11.0.5

What browser are you using?

Chrome 77

Demo

See below, the second element has the style triggered by the combineTargetFor even though the draggable isn't over it.

Screenshot 2019-10-03 at 2 41 42 PM

bug 🐞 investigating 🕵️‍♂️

All 7 comments

Confirmed. It also exists in 12.0

1487

Fixed in 12.0.0-beta.5

Thanks for raising this one!

Awesome. Thanks for the quick fix.

I'm also seeing an issue where combineTargetFor is null. I don't see anything in documentation where that would be expected. I don't have sandbox to show you unfortunately.
But I have isCombineEnabled set, my list a a virtual list, everything else seems to be working as expected and the combineWith id is correct.
I'm on react-beautiful-dnd version 13.0.0.
I don't know if this is an actual issue or if I should expect combineTargetFor to be null in certain cases.

I'm also seeing an issue where combineTargetFor is null. I don't see anything in documentation where that would be expected. I don't have sandbox to show you unfortunately.
But I have isCombineEnabled set, my list a a virtual list, everything else seems to be working as expected and the combineWith id is correct.
I'm on react-beautiful-dnd version 13.0.0.
I don't know if this is an actual issue or if I should expect combineTargetFor to be null in certain cases.

Are you dropping onto a separate list? Multi-list?

Does Combine work across lists?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jasonlewicki picture jasonlewicki  ·  3Comments

WJKwok picture WJKwok  ·  3Comments

ibash picture ibash  ·  3Comments

vrg-success picture vrg-success  ·  3Comments

khurram-wasim picture khurram-wasim  ·  3Comments