|
| dragingIndex) {
- className += ' drop-over-downward';
- }
- if (restProps.index < dragingIndex) {
- className += ' drop-over-upward';
+const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) => {
+ const ref = React.useRef();
+ const [{ isOver, dropClassName }, drop] = useDrop({
+ accept: type,
+ collect: monitor => {
+ const { index: dragIndex } = monitor.getItem() || {};
+ if (dragIndex === index) {
+ return {};
}
- }
-
- return connectDragSource(
- connectDropTarget( |