Commit 45397aa7 authored by Ermolaev Timur's avatar Ermolaev Timur

#147 Реализовал неактивные клетки при драгэнддропе

parent 1334d0ce
...@@ -56,10 +56,12 @@ const CalendarTask = ({ setCurrentTask, handleOpen, task, setCopyTask, width, le ...@@ -56,10 +56,12 @@ const CalendarTask = ({ setCurrentTask, handleOpen, task, setCopyTask, width, le
const dragStartHandler = useCallback((e, task) => { const dragStartHandler = useCallback((e, task) => {
setCurrentTask(task); setCurrentTask(task);
setCopyTask(task)
},[setCurrentTask]) },[setCurrentTask])
const dragEndHandler = useCallback((e) => { const dragEndHandler = useCallback((e) => {
e.target.style.boxShadow = 'none' e.target.style.boxShadow = 'none'
setCopyTask(null)
},[]) },[])
const onClickCopyIconHandler = useCallback((e) => { const onClickCopyIconHandler = useCallback((e) => {
......
...@@ -66,10 +66,12 @@ function CalendarWeekTask({ height, width, left, top, task, zIndex, handleOpen, ...@@ -66,10 +66,12 @@ function CalendarWeekTask({ height, width, left, top, task, zIndex, handleOpen,
} }
} }
}); });
setCopyTask(task)
} }
const dragEndHandler = (e) => { const dragEndHandler = (e) => {
e.target.style.boxShadow = 'none' e.target.style.boxShadow = 'none'
setCopyTask(null)
} }
const dragOverHandler = (e) => { const dragOverHandler = (e) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment