tauri/.changes/drag-drop-events-renamed.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

598 B

tauri
patch:breaking

Renamed DragDropEvent enum variants to better convey when they are triggered:

  • DragDropEvent::Dragged -> DragDropEvent::Enter
  • DragDropEvent::DragOver -> DragDropEvent::Over
  • DragDropEvent::Dropped -> DragDropEvent::Drop
  • DragDropEvent::Cancelled -> DragDropEvent::Leave

This also comes with a change in the events being emitted to JS and Rust event listeners:

  • tauri://drag -> tauri://drag-enter
  • tauri://drop-over -> tauri://drag-over
  • tauri://drop -> tauri://drag-drop
  • tauri://drag-cancelled -> tauri://drag-leave