drag-and-drop icon indicating copy to clipboard operation
drag-and-drop copied to clipboard

Documented event listeners / callbacks not implemented?

Open joostthehost opened this issue 1 year ago • 2 comments

According to the docs, there should be a bunch of Event Handlers. However, when trying to implement any one of those, it appears like they just aren't implemented?

Configuration in docs. The event listeners are reported at the end of the config section.

/**
   * EVENT LISTENERS:
   *
   * Callback function for when a sort operation is performed.
   */  
onSort?: SortEvent;

  /**
   * Callback function for when a transfer operation is performed.
   */  
onTransfer?: TransferEvent;

  /**
   * Fired when a drag is started, whether native drag or synthetic
   */  
onDragstart?: DragstartEvent;

  /**
   * Fired when a drag is ended, whether native drag or synthetic
   */  
onDragend?: DragendEvent;

joostthehost avatar Aug 14 '24 15:08 joostthehost

@joostthehost Ah, I did not mean to update the production docs. These events will be available upon the next release.

sashamilenkovic avatar Aug 14 '24 15:08 sashamilenkovic

Ah, thanks for the fast reply and clarification. I'll be looking out for the next release then, as these callbacks seem very useful! :)

joostthehost avatar Aug 14 '24 17:08 joostthehost

@sashamilenkovic, I don't want to push you, but I'm curious if you can tell us when to expect the next release? I'm asking because I'm in a real need of more advanced drag and drop options in my project ;)

joostthehost avatar Sep 20 '24 08:09 joostthehost

@joostthehost Very fair question! I was aiming to get out v0.2.0 last weekend but couldn't quite get it across the finish line. I would guess the next release will come out a week or so from now.

sashamilenkovic avatar Sep 20 '24 13:09 sashamilenkovic

@joostthehost As ov v0.2.0, there are not both global and parent event listeners: https://drag-and-drop.formkit.com/#events

sashamilenkovic avatar Oct 07 '24 14:10 sashamilenkovic