gantt-task-react-v 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18694,10 +18694,13 @@ const Gantt = (props) => {
18694
18694
  },
18695
18695
  [maxLevelLength, fullRowHeight, (_a = taskList == null ? void 0 : taskList.tableBottom) == null ? void 0 : _a.height]
18696
18696
  );
18697
- const ganttHeight = useMemo(
18698
- () => distances.ganttHeight ? Math.min(distances.ganttHeight, ganttFullHeight) : ganttFullHeight,
18699
- [distances, ganttFullHeight]
18700
- );
18697
+ const ganttHeight = useMemo(() => {
18698
+ const minRowsHeight = distances.minimumRowDisplayed * distances.rowHeight;
18699
+ if (typeof distances.ganttHeight === "number") {
18700
+ return Math.min(distances.ganttHeight, ganttFullHeight, minRowsHeight);
18701
+ }
18702
+ return Math.min(ganttFullHeight, minRowsHeight);
18703
+ }, [distances, ganttFullHeight]);
18701
18704
  const [taskToRowIndexMap, rowIndexToTaskMap, mapGlobalRowIndexToTask] = useMemo(
18702
18705
  () => getMapTaskToRowIndex(visibleTasks, comparisonLevels),
18703
18706
  [visibleTasks, comparisonLevels]
@@ -18711,10 +18711,13 @@
18711
18711
  },
18712
18712
  [maxLevelLength, fullRowHeight, (_a = taskList == null ? void 0 : taskList.tableBottom) == null ? void 0 : _a.height]
18713
18713
  );
18714
- const ganttHeight = React.useMemo(
18715
- () => distances.ganttHeight ? Math.min(distances.ganttHeight, ganttFullHeight) : ganttFullHeight,
18716
- [distances, ganttFullHeight]
18717
- );
18714
+ const ganttHeight = React.useMemo(() => {
18715
+ const minRowsHeight = distances.minimumRowDisplayed * distances.rowHeight;
18716
+ if (typeof distances.ganttHeight === "number") {
18717
+ return Math.min(distances.ganttHeight, ganttFullHeight, minRowsHeight);
18718
+ }
18719
+ return Math.min(ganttFullHeight, minRowsHeight);
18720
+ }, [distances, ganttFullHeight]);
18718
18721
  const [taskToRowIndexMap, rowIndexToTaskMap, mapGlobalRowIndexToTask] = React.useMemo(
18719
18722
  () => getMapTaskToRowIndex(visibleTasks, comparisonLevels),
18720
18723
  [visibleTasks, comparisonLevels]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-task-react-v",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Interactive Gantt Chart for React with TypeScript.",
5
5
  "author": "aguilanbon",
6
6
  "homepage": "https://github.com/aguilanbon/gantt-task-react-v",