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