Skip to content

fix: guard dragFromOutsideItem in _calculateDnDEnd when not provided#2808

Open
mixelburg wants to merge 1 commit into
bigcalendar:masterfrom
mixelburg:fix/dragFromOutsideItem-undefined
Open

fix: guard dragFromOutsideItem in _calculateDnDEnd when not provided#2808
mixelburg wants to merge 1 commit into
bigcalendar:masterfrom
mixelburg:fix/dragFromOutsideItem-undefined

Conversation

@mixelburg

@mixelburg mixelburg commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Fixes #2780

When using onDropFromOutside without providing dragFromOutsideItem, dropping an external item crashes with TypeError: dragFromOutsideItem is not a function.

This happens because _calculateDnDEnd unconditionally calls this.context.draggable.dragFromOutsideItem(). The dragOverFromOutside handler already guards against this (line 235 in EventContainerWrapper), but the dropFromOutside -> handleDropFromOutside -> _calculateDnDEnd path does not.

Fix: early-return slotMetrics.nextSlot(start) when dragFromOutsideItem is not provided, matching the guard pattern already used in WeekWrapper.js.

@mixelburg mixelburg changed the title fix: guard in when not provided fix: guard dragFromOutsideItem in _calculateDnDEnd when not provided Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dragFromOutsideItem issue when props is undefined

1 participant