Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "DragDropHelper: Add support for `onDragOver` prop in IDragDropOptions",
"type": "patch"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be minor?

}
],
"packageName": "office-ui-fabric-react",
"email": "erabelle@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ export class DragDropHelper implements IDragDropHelper {

onDragOver = (event: DragEvent) => {
event.preventDefault();

if (dragDropOptions.onDragOver) {
dragDropOptions.onDragOver(dragDropOptions.context.data, event);
}
};

this._dragEnterCounts[key] = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface IDragDropOptions {
onDragStart?: (item?: any, itemIndex?: number, selectedItems?: any[], event?: MouseEvent) => void;
onDrop?: (item?: any, event?: DragEvent) => void;
onDragEnd?: (item?: any, event?: DragEvent) => void;
onDragOver?: (item?: any, event?: DragEvent) => void;
}

export interface IDragDropEvent {
Expand Down