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
Cannot call beginDrag while dragging #545
Comments
It's my code and i have two errors - 1) Cannot call beginDrag while dragging2) Cannot call hover after drop.What can i do to fixed id? Help help help pls!!! import React, { PropTypes } from 'react'; import View from '../View'; import { StyleSheet, css } from '@roistat/ui'; const ItemTypes = { const itemSource = { const itemTarget = {
}; @DropTarget(ItemTypes.ColumnSettingsTableItem, itemTarget, connect => ({
} const styles = StyleSheet.create({ |
I have the same problem. Using react-dnd 2.1.4 with react-virtualized endless scroll. When scrolling while dragging item (e.g. we want to put dragged element to some droppable at the bottom of the scrolling list) - drag source element is unmounted after some scrolling, but nothing goes wrong at this point - drop event successfully captured, everything looks okay. But when we try to drag next item after that - react-dnd says "Cannot call beginDrag while dragging." |
@mikhail-eremin I have the same problem... Did you find any workaround by any chance? thanks |
@m0xx I did weird workaround for it - in my case problem occurs because drag source element is being unmounted while we drag it (I use react-virtualized and if you scroll for a while while dragging - some items from the top can be unmounted - this is how react-virtualized works) So what I do is remembering the fact that certain item (current drag source) was unmounted (use componentWillUnmount in dragged item) and when in DROP source monitor (in my case) I check if some source was unmounted during drag, and if so - I manually dispatch action: This small trick helps in my case, but still, it is kinda dirty hack. |
@mikhail-eremin Thanks for the workaround, I use react-virtualized too so I had the same problem! |
I have this issue very randomly. I can't reproduce yet. Not a problem with keys (they are hashed by content) or disappearing dom elements. I think the referenced PR makes sense, can you include that fix here too? |
@darthtrevino We run into the same issue today. The linked PR (https://github.com/Asana/react-dnd-html5-backend/pull/6/files) does fix the problem. Can it be included here please? |
@darthtrevino Hi, we've tried installing version 2.5.0 but it seems npm wasn't updated and the latest release is still 2.4.0? |
@liorbrauer, the html5 backend is set at 2.5.0, but the other packages are at 2.4.0 presently. We're using Lerna to manage versioning, and it looks like it won't release packages that have not been updated (https://github.com/lerna/lerna#fixedlocked-mode-default). If this is causing issues, let me know. |
@darthtrevino thanks for the reply! I guess I'm a bit confused on how to get the latest html5 backend. We currently have both |
@darthtrevino Hi again, sorry for nagging but I still cannot find how to use the latest version of html5 backend ( The latest version listed under NPM (https://www.npmjs.com/package/react-dnd-html5-backend) is still Maybe I'm missing something? |
We are having the same problem. For now we do self host the html5 backend package. |
@ms88privat thanks for the reply. FWIW, isn't this just a matter of updating the NPM package(s)? |
I see, my bad. I thought the 2.5.0 cut was already published.
…On Mon, Sep 4, 2017 at 2:44 AM Lior Brauer ***@***.***> wrote:
@ms88privat <https://github.com/ms88privat> thanks for the reply. FWIW,
isn't this just a matter of updating the NPM package(s)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#545 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAG7iIY5EQ0LvFbWMhdFcUS3PXcZtpgoks5se8Z0gaJpZM4KDvvc>
.
|
Hi,
I have a nested component inside a DropTarget which has items that can also be dragged (not using react-dnd). the issue is that once i drag an item i get this error.
Is there a way to disable it? or override it?
Thanks!
The text was updated successfully, but these errors were encountered: