diff --git a/components/table/demo/drag-sorting-handler.md b/components/table/demo/drag-sorting-handler.md
index 7146d85471c8..31e715b10400 100644
--- a/components/table/demo/drag-sorting-handler.md
+++ b/components/table/demo/drag-sorting-handler.md
@@ -15,11 +15,11 @@ Alternatively you can implement drag sorting with handler using [react-sortable-
```jsx
import { Table } from 'antd';
-import { sortableContainer, sortableElement, sortableHandle } from 'react-sortable-hoc';
+import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
import { MenuOutlined } from '@ant-design/icons';
import { arrayMoveImmutable } from 'array-move';
-const DragHandle = sortableHandle(() => );
+const DragHandle = SortableHandle(() => );
const columns = [
{
@@ -68,8 +68,8 @@ const data = [
},
];
-const SortableItem = sortableElement(props =>
);
-const SortableContainer = sortableContainer(props => );
+const SortableItem = SortableElement(props =>
);
+const SortableBody = SortableContainer(props => );
class SortableTable extends React.Component {
state = {
@@ -79,14 +79,16 @@ class SortableTable extends React.Component {
onSortEnd = ({ oldIndex, newIndex }) => {
const { dataSource } = this.state;
if (oldIndex !== newIndex) {
- const newData = arrayMoveImmutable([].concat(dataSource), oldIndex, newIndex).filter(el => !!el);
+ const newData = arrayMoveImmutable([].concat(dataSource), oldIndex, newIndex).filter(
+ el => !!el,
+ );
console.log('Sorted items: ', newData);
this.setState({ dataSource: newData });
}
};
DraggableContainer = props => (
-