tauri/.changes/drag-drop-events-renamed-api.md
Amr Bashir 261c9f942d
refactor!(core & api): rename drag events for better consistency and clarity (#10170)
* refacotr!(core & api): rename drag events for better consistency and clarity

* more renames

* remove imports

* fix drag over listen

* update example

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-07-12 10:22:06 -03:00

544 B

@tauri-apps/api
patch:breaking

Renamed drag and drop events in TauriEvent enum to better convey when they are triggered:

  • TauriEvent.DRAG -> TauriEvent.DRAG_ENTER
  • TauriEvent.DROP_OVER -> TauriEvent.DRAG_OVER
  • TauriEvent.DROP -> TauriEvent.DRAG_DROP
  • TauriEvent.DROP_CANCELLED -> TauriEvent::DRAG_LEAVE

Also the type field values in Window/Webview/WebviewWindow.onDropEvent and DragDropEvent have changed:

  • dragged -> enter
  • dragOver -> over
  • dropped -> drop
  • cancelled -> leave