task props issue fix

This commit is contained in:
unknown committed 2020-08-31 23:26:44 +03:00
1 parent 3b32722019
commit 75e929f77a
3 files changed
+6 -2

No files matched your search

+4
View File
@@ -54,6 +54,10 @@ export const Gantt: React.SFC<GanttProps> = ({
const gridWidth = dates.length * columnWidth;
const ganttFullHeight = ganttTasks.length * rowHeight;
useEffect(() => {
setGanttTasks(tasks);
}, [tasks]);
// scroll events
useEffect(() => {
const handleWheel = (event: WheelEvent) => {
+1 -1
View File
@@ -270,7 +270,7 @@ export const TaskGanttContent: React.FC<TaskGanttContentProps> = ({
return task.barChildren.map(child => {
return (
<Arrow
key={`Arrow from ${task.id} to ${tasks[child].id}`}
key={`Arrow from ${task.id} to ${barTasks[child].id}`}
taskFrom={task}
taskTo={barTasks[child]}
rowHeight={rowHeight}