-
Notifications
You must be signed in to change notification settings - Fork 210
Migration v2.1 to 5.x
Wayne Van Son edited this page Sep 25, 2020
·
2 revisions
Welcome. I'm sure you're hear because something doesn't work.
If you believe something is missing or that you're still in a pickle, feel free to raise an issue.
Users must install sortablejs
and @types/sortablejs
because they're listed as peer dependencies. They're no longer included in react-sortablejs
// yarn
yarn add sortablejs react-sortablejs && yarn add -D @types/sortablejs
// npm
npm install --save sortablejs react-sortablejs && npm install --save-dev @types/sortablejs
Plugins do not have to be mounted to use. However, you must still activate them in the options.
sortablejs
mounts all plugins and does not export them.
-import { Sortable, MultiDrag, ReactSortable } from 'react-sortablejs'
+import { ReactSortable } from 'react-sortablejs'
-
-Sortable.mount(new MultiDrag())
const Component = (props) => <ReactSortable multiDrag={true} {...props} />
dfdf