Update DraggableComponent.tsx

This commit is contained in:
Kman1131 2021-02-07 19:37:59 +13:00 committed by GitHub
parent b0f0abed46
commit 2a807e9125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -2,9 +2,7 @@ import * as React from 'react';
import { DragSource, DropTarget } from 'react-dnd';
import { findDOMNode } from 'react-dom';
import { css } from 'office-ui-fabric-react/lib/Utilities';
import styles from './DraggableComponent.module.scss';
import * as strings from 'ListFormStrings';
import { Icon } from 'office-ui-fabric-react';
@ -26,12 +24,9 @@ const dragSource = {
};
const dragTarget = {
hover(props: IDraggableComponentProps, monitor) {
const { key: draggedKey } = monitor.getItem();
console.log(draggedKey)
if (draggedKey !== props.itemKey) {
console.log('index ' + props.index)
props.moveField(draggedKey, props.index);
}
},