diff --git a/examples/demos/dndOutsideSource.js b/examples/demos/dndOutsideSource.js index 979b5b9c5..0c130653e 100644 --- a/examples/demos/dndOutsideSource.js +++ b/examples/demos/dndOutsideSource.js @@ -67,7 +67,7 @@ class Dnd extends React.Component { this.newEvent(event) } - moveEvent({ event, start, end, isAllDay: droppedOnAllDaySlot }) { + moveEvent = ({ event, start, end, isAllDay: droppedOnAllDaySlot }) => { const { events } = this.state const idx = events.indexOf(event) @@ -107,7 +107,7 @@ class Dnd extends React.Component { //alert(`${event.title} was resized to ${start}-${end}`) } - newEvent(event) { + newEvent = event => { let idList = this.state.events.map(a => a.id) let newId = Math.max(...idList) + 1 let hour = { diff --git a/src/addons/dragAndDrop/WeekWrapper.js b/src/addons/dragAndDrop/WeekWrapper.js index c829255c8..51ab6b109 100644 --- a/src/addons/dragAndDrop/WeekWrapper.js +++ b/src/addons/dragAndDrop/WeekWrapper.js @@ -80,7 +80,7 @@ class WeekWrapper extends React.Component { } handleMove = ({ x, y }, node, draggedEvent) => { - const { event = draggedEvent } = this.context.draggable.dragAndDropAction + const event = this.context.draggable.dragAndDropAction.event || draggedEvent const metrics = this.props.slotMetrics const { accessors } = this.props