useSchedulerEditItemDragItemContext does not work

1 Answer 102 Views
Drag and Drop Scheduler
Sævar
Top achievements
Rank 1
Sævar asked on 25 Feb 2022, 09:32 AM
According to the documentation( https://www.telerik.com/kendo-react-ui/components/scheduler/customization/items/ ), the composition tree looks as follows: EditItem -> Drag -> ViewItem -> Item, and according to this: https://www.telerik.com/kendo-react-ui/components/scheduler/customization/items/state-update/ this hook should give us access to the item being dragged.

However, regardless of where we use this hook, there is never any data. We've tried using it inside basically every part of the component(a custom item, view item, edit item, but regardless of where we try to use it, we just get `null`s back. Even when using it inside a custom `SchedulerItem` which has been written to render in a different color when on-going, when it is dragged, the item will correctly change color, but there is still no information available to us about it being dragged.


1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 25 Feb 2022, 11:04 AM

Hello,

I updated the demo to use that hook and it was showing the item when a drag:

https://stackblitz.com/edit/react-khpzgu?file=app/main.tsx (drag an item to see the result in the console)

Please let me know If I missed something?

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Drag and Drop Scheduler
Asked by
Sævar
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or