You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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?
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@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 👍
Activity
[-][bug] [/-][+]Multidrag is not a constructor [bug] [/+]waynevanson commentedon Apr 20, 2020
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 commentedon Apr 23, 2020
@trollcus If you can get me a working example repo/codesandbox I can investigate. Refer to #143 for more information.
[-]Multidrag is not a constructor [bug] [/-][+][bug] Multidrag is not a constructor[/+]smatt989 commentedon May 20, 2020
Any update here? have the same issue!
trollcus commentedon May 29, 2020
@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 commentedon 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 commentedon Sep 27, 2020
fixed by SortableJS/Sortable#1933