gantt-task-react-powern 0.6.13 → 0.6.14

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.
@@ -3136,6 +3136,8 @@ var Gantt = function Gantt(_ref) {
3136
3136
  isProcessing = _useState15[0],
3137
3137
  setIsProcessing = _useState15[1];
3138
3138
 
3139
+ var processCounter = useRef(0);
3140
+ var performanceRef = useRef(performance.now());
3139
3141
  var buffer = rowHeight * 10;
3140
3142
  var visibleStartY = scrollY - buffer;
3141
3143
  var visibleEndY = scrollY + ganttHeight + buffer;
@@ -3152,7 +3154,15 @@ var Gantt = function Gantt(_ref) {
3152
3154
  clearTimeout(debounceRef.current);
3153
3155
  }
3154
3156
 
3155
- setIsProcessing(true);
3157
+ if (performance.now() - performanceRef.current > 3000 && processCounter.current < 2) {
3158
+ processCounter.current += 1;
3159
+ }
3160
+
3161
+ if (processCounter.current <= 2) {
3162
+ setIsProcessing(true);
3163
+ }
3164
+
3165
+ performanceRef.current = performance.now();
3156
3166
  debounceRef.current = setTimeout(function () {
3157
3167
  var filteredTasks;
3158
3168
  filteredTasks = removeHiddenTasks(tasks);