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

Drag from outside is missing placeholder #1152

Closed
renomateo opened this issue Feb 27, 2020 · 9 comments · Fixed by #1164
Closed

Drag from outside is missing placeholder #1152

renomateo opened this issue Feb 27, 2020 · 9 comments · Fixed by #1164

Comments

@renomateo
Copy link

Run /examples/15-drag-from-outside.html using version 0.18.x and note that the placeholder doesn't show up at all like it does in v0.17: https://strml.github.io/react-grid-layout/examples/15-drag-from-outside.html

@grahammcculloch
Copy link

I'm also experiencing this problem.

@violabg
Copy link

violabg commented Mar 2, 2020

me too
Duplicate of #1153

@Hannah17Hui
Copy link

me too

@Anwardo
Copy link

Anwardo commented Mar 5, 2020

I have the same issue. This also means that the rest of the layout doesn't shift in response to dragging it over items.

@paul-sachs
Copy link
Contributor

paul-sachs commented Mar 7, 2020

Also running into this, it seems to me that this line should trigger an update to state (probably activeDrag or something like it) but instead, it just modifies a local variable, which doesn't trigger any render. I might dig in later to try to understand what the appropriate response should be, if i get some time.

@paul-sachs
Copy link
Contributor

I would assume these changes are due to the performance improvements in 0.18, so I'd like to figure out a way to maintain performance but also get the placeholder working.

paul-sachs pushed a commit to paul-sachs/react-grid-layout that referenced this issue Mar 10, 2020
Fixes react-grid-layout#1152. When a drag event happens from an external element,
we should mimic the drag activity.
@paul-sachs
Copy link
Contributor

paul-sachs commented Mar 10, 2020

I've submitted a PR to fix this. @STRML let me know if there are any changes needed, I know this issue is blocking me from using this library entirely.

STRML added a commit that referenced this issue Mar 11, 2020
We can also do a simpler equality check on activeDrag

Added test to ensure we don't regress this

Fixes #1152 and supersedes #1162
STRML added a commit that referenced this issue Mar 12, 2020
* test(mock): ensure we're importing source files

Otherwise we'll import from build/

* fix(droppable): ensure SCU doesn't short-circuit droppable

We can also do a simpler equality check on activeDrag

Added test to ensure we don't regress this

Fixes #1152 and supersedes #1162
@paul-sachs
Copy link
Contributor

paul-sachs commented Mar 16, 2020

@STRML any idea when this might be released? Just want to know if I should fall back to 0.17 or wait for the newest 0.18.

@STRML
Copy link
Collaborator

STRML commented Mar 16, 2020

Good call. Released 0.18.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants