Possible error in event documentation for DragDropProvider (typescript)
- Dominant language
- TypeScript
- Stars
- 17.6k
- Forks
- 924
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 2
Description
https://dndkit.com/react/components/drag-drop-provider#param-on-drag-end lists the onDragEnd prop as:
```ts
onDragOver (event: DragOverEvent) => void
```
If I set up a handler like so:
```
const handleDragEnd = (event: DragEndEvent) => {
if (event.canceled) return;
...other code....
}
```
I get a typescript error:
> Property 'canceled' does not exist on type '(event: { operation: DragOperationSnapshot, Droppable>; nativeEvent?: Event | undefined; canceled: boolean; suspend(): { ...; }; }, manager: DragDropManager<...>) => void'.ts(2339)
However if I use:
```ts
const handleDragEnd = (event: Parameters[0]) => {
if (event.canceled) return;
...
}
```
it works fine.
It's also possible I missed something, I only started experimenting with this library today.
Contributor guide
Assessment
This issue has not been assessed yet.