diff --git a/package.json b/package.json
index 82dc7a44..a1fd868c 100644
--- a/package.json
+++ b/package.json
@@ -154,7 +154,7 @@
"react-router-dom": "^4.2.2",
"react-router-redux": "^5.0.0-alpha.6",
"react-sidebar": "^2.2.1",
- "react-sortable": "^1.2.0",
+ "react-sortable-hoc": "^0.6.8",
"react-split-pane": "^0.1.66",
"react-toolbox": "^2.0.0-beta.12",
"react-topbar-progress-indicator": "^1.0.0",
diff --git a/src/components/Widgets/ListControl.css b/src/components/Widgets/ListControl.css
index 72aaa7dc..e6798ed5 100644
--- a/src/components/Widgets/ListControl.css
+++ b/src/components/Widgets/ListControl.css
@@ -52,7 +52,6 @@
.nc-listControl-item {
position: relative;
padding-left: 24px;
- cursor: move;
}
.nc-listControl-objectLabel {
@@ -83,9 +82,11 @@
}
.nc-listControl-dragIcon {
- position: absolute;
- top: 2px;
+ cursor: move;
display: block;
- width: 100%;
+ position: absolute;
text-align: center;
+ top: 2px;
+ width: 100%;
+ z-index: 1;
}
diff --git a/src/components/Widgets/ListControl.js b/src/components/Widgets/ListControl.js
index ddf6ece6..d40e015a 100644
--- a/src/components/Widgets/ListControl.js
+++ b/src/components/Widgets/ListControl.js
@@ -1,12 +1,12 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { List, Map, fromJS } from 'immutable';
-import { sortable } from 'react-sortable';
+import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
import FontIcon from 'react-toolbox/lib/font_icon';
import ObjectControl from './ObjectControl';
function ListItem(props) {
- return
-
-
-
-
-
{this.objectLabel(item)}
-
-
+ return (
+
+
+
+ {this.objectLabel(item)}
+
);
- }
+ };
renderListControl() {
const { value, forID, field } = this.props;
const listLabel = field.get('label');
return (
- {value && value.map((item, index) => this.renderItem(item, index))}
+