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

[bug] Multidrag is not a constructor #141

Closed
trollcus opened this issue Apr 20, 2020 · 6 comments
Closed

[bug] Multidrag is not a constructor #141

trollcus opened this issue Apr 20, 2020 · 6 comments

Comments

@trollcus
Copy link

Hi!

Been using the latest version and everything works smoothy. However when I try to enable mulltidrag I get thrown an error saying that MultiDrag is not a constructor:
image

React sortablejs version: "^2.0.11",

The code I'm running:


import { ReactSortable, Sortable, MultiDrag } from 'react-sortablejs';

Sortable.mount(new MultiDrag());


My app is built upon NextJS with the version : "^9.3.2"

What can I do in order to enable multidrag without the error?

@trollcus trollcus changed the title [bug] Multidrag is not a constructor [bug] Apr 20, 2020
@waynevanson
Copy link
Collaborator

Perhaps a webpack bug of some sort. The code does export MultiDrag.

I don't think I can help right now, as it looks like you've done everything correctly. I'll take a look in the next few days again and see what I come up with.

@waynevanson
Copy link
Collaborator

@trollcus If you can get me a working example repo/codesandbox I can investigate. Refer to #143 for more information.

@waynevanson waynevanson changed the title Multidrag is not a constructor [bug] [bug] Multidrag is not a constructor Apr 23, 2020
@smatt989
Copy link

Any update here? have the same issue!

@trollcus
Copy link
Author

@waynevanson Hmm I'll try to get it set up. Unfortunately it is an private repo but I'll try to get it reproduced!

@trollcus
Copy link
Author

trollcus commented Jun 4, 2020

@waynevanson @smatt989 Solved it by strategically placing the mount function at a place that I knew would only be kicked off once in my application when rendering the list components instead at the component level where it would be kicked off multiple times. Don't know if that is the proper way but works for me 👍

@waynevanson
Copy link
Collaborator

fixed by SortableJS/Sortable#1933

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

No branches or pull requests

3 participants