diff --git a/src/components/Card.js b/src/components/Card.js index f16f445d6..3790b44e3 100644 --- a/src/components/Card.js +++ b/src/components/Card.js @@ -38,12 +38,14 @@ class Card extends Component { }) render() { - const {id, index, cardStyle, editable, customCardLayout, ...otherProps} = this.props + const {id, index, cardStyle, draggable, editable, customCardLayout, ...otherProps} = this.props const style = customCardLayout ? {...cardStyle, padding: 0} : cardStyle + const isDragDisabled = !draggable return ( - + {(dragProvided, dragSnapshot) => { - const dragStyle = this.getItemStyle(dragSnapshot.isDragging, dragProvided.draggableProps.style) + const draggablePropsStyle = dragProvided.draggableProps && dragProvided.draggableProps.style + const dragStyle = this.getItemStyle(dragSnapshot.isDragging, draggablePropsStyle) return (
- + ) )