task props issue fix
This commit is contained in:
parent
3b32722019
commit
75e929f77a
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gantt-task-react",
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.7",
|
||||
"description": "Interactive Gantt Chart for React with TypeScript.",
|
||||
"author": "MaTeMaTuK <maksym.vikarii@gmail.com>",
|
||||
"homepage": "https://github.com/MaTeMaTuK/gantt-task-react",
|
||||
|
||||
@ -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) => {
|
||||
|
||||
@ -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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user