gantt-task-react-powern 0.6.6 → 0.6.8
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 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +11 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -3087,6 +3087,8 @@ var Gantt = function Gantt(_ref) {
|
|
|
3087
3087
|
barTasks = _useState6[0],
|
|
3088
3088
|
setBarTasks = _useState6[1];
|
|
3089
3089
|
|
|
3090
|
+
var debounceRef = useRef(null);
|
|
3091
|
+
|
|
3090
3092
|
var _useState7 = useState({
|
|
3091
3093
|
action: ""
|
|
3092
3094
|
}),
|
|
@@ -3140,7 +3142,11 @@ var Gantt = function Gantt(_ref) {
|
|
|
3140
3142
|
}
|
|
3141
3143
|
}, [startDate, endDate]);
|
|
3142
3144
|
useEffect(function () {
|
|
3143
|
-
|
|
3145
|
+
if (debounceRef.current) {
|
|
3146
|
+
clearTimeout(debounceRef.current);
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3149
|
+
debounceRef.current = setTimeout(function () {
|
|
3144
3150
|
var filteredTasks;
|
|
3145
3151
|
|
|
3146
3152
|
if (onExpanderClick) {
|
|
@@ -3189,10 +3195,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
3189
3195
|
|
|
3190
3196
|
setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor));
|
|
3191
3197
|
}, delayToRender);
|
|
3198
|
+
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl, scrollX, onExpanderClick]);
|
|
3199
|
+
useEffect(function () {
|
|
3192
3200
|
return function () {
|
|
3193
|
-
|
|
3201
|
+
clearTimeout(debounceRef.current);
|
|
3194
3202
|
};
|
|
3195
|
-
}, [
|
|
3203
|
+
}, []);
|
|
3196
3204
|
useEffect(function () {
|
|
3197
3205
|
if (viewMode === dateSetup.viewMode && (viewDate && !currentViewDate || viewDate && (currentViewDate === null || currentViewDate === void 0 ? void 0 : currentViewDate.valueOf()) !== viewDate.valueOf())) {
|
|
3198
3206
|
var dates = dateSetup.dates;
|