Skip to content

feat: Callback from FluentDropZone or FluentDragContainer when a drag ends with no valid drop target #2494

@Skintkingle

Description

@Skintkingle

🙋 Feature Request

A mechanism similar to the other callbacks from both the FluentDropZone and FluentDragContainer elements that is invoked when the drag event concludes with no valid drop target.

🤔 Expected Behavior

<FluentDragContainer TItem=MyItem OnDragStart=ItemPickedUp OnDragStop=ItemPutBackDown>
or
<FluentDropZone Item=myItem OnDragStart=Selected OnDragStop=NoValidPlacement>

😯 Current Behavior

Event OnDragStop doesn't currently exist. OnDropEnd exists, but that's only triggered off if the draggable drop zone was dropped on a valid target.

💁 Possible Solution

OnDragStop to complement the existing OnDragStart Or OnDragEnd to match the dragend event of the HTML Drag and Drop API.

🔦 Context

We are trying to have an event that trickles through components to effect their state when an object is picked up. It's perfectly plausible that the user decides to drop it on nothing (as to say, Oops I picked up the wrong one). Or mistakenly drop it early by letting go of left click. We want to be able to trickle another event through so components states can be reset when the drop didn't go through.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions