diff --git a/examples/demos/dnd.js b/examples/demos/dnd.js index a3a4573e0..526bd7603 100644 --- a/examples/demos/dnd.js +++ b/examples/demos/dnd.js @@ -68,7 +68,6 @@ class Dnd extends React.Component { resizeEvent = ({ event, start, end }) => { const { events } = this.state - const nextEvents = events.map(existingEvent => { return existingEvent.id == event.id ? { ...existingEvent, start, end } diff --git a/src/addons/dragAndDrop/EventContainerWrapper.js b/src/addons/dragAndDrop/EventContainerWrapper.js index 98ec7d61c..acc2f938a 100644 --- a/src/addons/dragAndDrop/EventContainerWrapper.js +++ b/src/addons/dragAndDrop/EventContainerWrapper.js @@ -161,15 +161,20 @@ class EventContainerWrapper extends React.Component { selector.on('select', point => { const bounds = getBoundsForNode(node) isBeingDragged = false - if (!this.state.event || !pointInColumn(bounds, point)) return - this.handleInteractionEnd() + const { dragAndDropAction } = this.context.draggable + if (dragAndDropAction.action === 'resize') { + this.handleInteractionEnd() + } else if (!this.state.event || !pointInColumn(bounds, point)) { + return + } else { + this.handleInteractionEnd() + } }) selector.on('click', () => { if (isBeingDragged) this.reset() this.context.draggable.onEnd(null) }) - selector.on('reset', () => { this.reset() this.context.draggable.onEnd(null) @@ -179,7 +184,6 @@ class EventContainerWrapper extends React.Component { handleInteractionEnd = () => { const { resource } = this.props const { event } = this.state - this.reset() this.context.draggable.onEnd({