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