calendar fix contd

This commit is contained in:
victorAnumudu
2025-01-19 07:14:46 +01:00
parent e8123bc898
commit d1d6c6a9fc
3 changed files with 31 additions and 19 deletions
+6 -1
View File
@@ -6,12 +6,17 @@ const ExternalDraggable = ({dummyEvents}) => {
useEffect(() => {
// Make the external events draggable
new Draggable(eventContainerRef.current, {
const draggable = new Draggable(eventContainerRef.current, {
itemSelector: ".fc-event",
eventData: (eventEl) => ({
title: eventEl.innerText.trim(),
}),
});
// Cleanup the Draggable instance on unmount
return () => {
draggable.destroy();
};
}, []);
return (