diff --git a/README.md b/README.md index ca0c97f..9373a31 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ npm start - TooltipContent: [`React.FC<{ task: Task; fontSize: string; fontFamily: string; }>;`](https://github.com/MaTeMaTuK/gantt-task-react/blob/main/src/components/other/tooltip.tsx#L56) - TaskListHeader: `React.FC<{ headerHeight: number; rowWidth: string; fontFamily: string; fontSize: string;}>;` -- TaskListTable: `React.FC<{ rowHeight: number; rowWidth: string; fontFamily: string; fontSize: string; locale: string; tasks: Task[]; selectedTaskId: string setSelectedTask: (taskId: string) => void; }>;` +- TaskListTable: `React.FC<{ rowHeight: number; rowWidth: string; fontFamily: string; fontSize: string; locale: string; tasks: Task[]; selectedTaskId: string; setSelectedTask: (taskId: string) => void; }>;` ### Task diff --git a/src/components/gantt/gantt.tsx b/src/components/gantt/gantt.tsx index e9795b5..7b7f8a5 100644 --- a/src/components/gantt/gantt.tsx +++ b/src/components/gantt/gantt.tsx @@ -52,7 +52,7 @@ export const Gantt: React.SFC = ({ const [startDate, endDate] = ganttDateRange(ganttTasks, viewMode); const dates = seedDates(startDate, endDate, viewMode); - const svgHeight = rowHeight * tasks.length; + const svgHeight = rowHeight * ganttTasks.length; const gridWidth = dates.length * columnWidth; const ganttFullHeight = ganttTasks.length * rowHeight; diff --git a/src/types/public-types.ts b/src/types/public-types.ts index 292d191..853e898 100644 --- a/src/types/public-types.ts +++ b/src/types/public-types.ts @@ -107,6 +107,9 @@ export interface StylingOption { locale: string; tasks: Task[]; selectedTaskId: string; + /** + * Sets selected task by id + */ setSelectedTask: (taskId: string) => void; }>; }