gantt-task-react-powern 0.6.3 → 0.6.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.
@@ -948,7 +948,6 @@ var TaskList = function TaskList(_ref) {
948
948
  taskLabelRenderer: taskLabelRenderer,
949
949
  virtualItems: virtualizer.getVirtualItems()
950
950
  };
951
- console.debug(virtualizer.getTotalSize());
952
951
  return React.createElement("div", {
953
952
  ref: taskListRef
954
953
  }, React.createElement(TaskListHeader, Object.assign({}, headerProps)), React.createElement("div", {
@@ -3139,53 +3138,58 @@ var Gantt = function Gantt(_ref) {
3139
3138
  }
3140
3139
  }, [startDate, endDate]);
3141
3140
  useEffect(function () {
3142
- var filteredTasks;
3141
+ var timer = setTimeout(function () {
3142
+ var filteredTasks;
3143
3143
 
3144
- if (onExpanderClick) {
3145
- filteredTasks = removeHiddenTasks(tasks);
3146
- } else {
3147
- filteredTasks = tasks;
3148
- }
3144
+ if (onExpanderClick) {
3145
+ filteredTasks = removeHiddenTasks(tasks);
3146
+ } else {
3147
+ filteredTasks = tasks;
3148
+ }
3149
3149
 
3150
- filteredTasks = filteredTasks.sort(sortTasks);
3150
+ filteredTasks = filteredTasks.sort(sortTasks);
3151
3151
 
3152
- var _ganttDateRange2 = ganttDateRange(filteredTasks, viewMode, preStepsCount),
3153
- startDateRange = _ganttDateRange2[0],
3154
- endDateRange = _ganttDateRange2[1];
3152
+ var _ganttDateRange2 = ganttDateRange(filteredTasks, viewMode, preStepsCount),
3153
+ startDateRange = _ganttDateRange2[0],
3154
+ endDateRange = _ganttDateRange2[1];
3155
3155
 
3156
- var newDates = seedDates(startDateRange, endDateRange, viewMode);
3156
+ var newDates = seedDates(startDateRange, endDateRange, viewMode);
3157
3157
 
3158
- if (scheduleType === "lookAhead") {
3159
- newDates = seedDates(startDate, endDate, viewMode);
3160
- }
3158
+ if (scheduleType === "lookAhead") {
3159
+ newDates = seedDates(startDate, endDate, viewMode);
3160
+ }
3161
3161
 
3162
- if (rtl) {
3163
- newDates = newDates.reverse();
3162
+ if (rtl) {
3163
+ newDates = newDates.reverse();
3164
3164
 
3165
- if (scrollX === -1) {
3166
- setScrollX(newDates.length * columnWidth);
3165
+ if (scrollX === -1) {
3166
+ setScrollX(newDates.length * columnWidth);
3167
+ }
3167
3168
  }
3168
- }
3169
3169
 
3170
- if (scheduleType !== "lookAhead") {
3171
- setDateSetup({
3172
- dates: seedDates(startDateRange, endDateRange, viewMode),
3173
- viewMode: viewMode
3174
- });
3175
- }
3170
+ if (scheduleType !== "lookAhead") {
3171
+ setDateSetup({
3172
+ dates: seedDates(startDateRange, endDateRange, viewMode),
3173
+ viewMode: viewMode
3174
+ });
3175
+ }
3176
3176
 
3177
- var _getCriticalPaths = getCriticalPaths(leafTasks),
3178
- primaryPath = _getCriticalPaths[0],
3179
- secondaryPath = _getCriticalPaths[1];
3177
+ var _getCriticalPaths = getCriticalPaths(leafTasks),
3178
+ primaryPath = _getCriticalPaths[0],
3179
+ secondaryPath = _getCriticalPaths[1];
3180
3180
 
3181
- uncolorAll(tasks);
3181
+ uncolorAll(tasks);
3182
3182
 
3183
- if (scheduleType !== "lookAhead") {
3184
- colorPath(secondaryPath, "#00ff00", tasks, "secondary");
3185
- colorPath(primaryPath, "#ff0000", tasks, "primary");
3186
- }
3183
+ if (scheduleType !== "lookAhead") {
3184
+ colorPath(secondaryPath, "#00ff00", tasks, "secondary");
3185
+ colorPath(primaryPath, "#ff0000", tasks, "primary");
3186
+ }
3187
3187
 
3188
- setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor));
3188
+ setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor));
3189
+ }, 500);
3190
+ return function () {
3191
+ return clearTimeout(timer);
3192
+ };
3189
3193
  }, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl, onExpanderClick]);
3190
3194
  useEffect(function () {
3191
3195
  if (viewMode === dateSetup.viewMode && (viewDate && !currentViewDate || viewDate && (currentViewDate === null || currentViewDate === void 0 ? void 0 : currentViewDate.valueOf()) !== viewDate.valueOf())) {