gantt-task-react-powern 0.6.6 → 0.6.7
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 +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +13 -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,13 @@ var Gantt = function Gantt(_ref) {
|
|
|
3140
3142
|
}
|
|
3141
3143
|
}, [startDate, endDate]);
|
|
3142
3144
|
useEffect(function () {
|
|
3143
|
-
|
|
3145
|
+
console.debug("Tasks or view mode changed, recalculating bars...");
|
|
3146
|
+
|
|
3147
|
+
if (debounceRef.current) {
|
|
3148
|
+
clearTimeout(debounceRef.current);
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
debounceRef.current = setTimeout(function () {
|
|
3144
3152
|
var filteredTasks;
|
|
3145
3153
|
|
|
3146
3154
|
if (onExpanderClick) {
|
|
@@ -3189,10 +3197,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
3189
3197
|
|
|
3190
3198
|
setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor));
|
|
3191
3199
|
}, delayToRender);
|
|
3200
|
+
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl, onExpanderClick]);
|
|
3201
|
+
useEffect(function () {
|
|
3192
3202
|
return function () {
|
|
3193
|
-
|
|
3203
|
+
clearTimeout(debounceRef.current);
|
|
3194
3204
|
};
|
|
3195
|
-
}, [
|
|
3205
|
+
}, []);
|
|
3196
3206
|
useEffect(function () {
|
|
3197
3207
|
if (viewMode === dateSetup.viewMode && (viewDate && !currentViewDate || viewDate && (currentViewDate === null || currentViewDate === void 0 ? void 0 : currentViewDate.valueOf()) !== viewDate.valueOf())) {
|
|
3198
3208
|
var dates = dateSetup.dates;
|