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