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