gantt-task-react-powern 0.6.9 → 0.6.11
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 -11
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +11 -11
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3109,7 +3109,11 @@ var Gantt = function Gantt(_ref) {
|
|
|
3109
3109
|
setFailedTask = _useState9[1];
|
|
3110
3110
|
|
|
3111
3111
|
var svgWidth = columnWidth < 55 ? (dateSetup.dates.length + 0.5) * columnWidth : dateSetup.dates.length * columnWidth;
|
|
3112
|
-
var
|
|
3112
|
+
var displayedTasks = React.useMemo(function () {
|
|
3113
|
+
var filtered = onExpanderClick ? removeHiddenTasks(tasks) : tasks;
|
|
3114
|
+
return filtered.sort(sortTasks);
|
|
3115
|
+
}, [tasks, onExpanderClick]);
|
|
3116
|
+
var ganttFullHeight = displayedTasks.length * rowHeight;
|
|
3113
3117
|
|
|
3114
3118
|
var _useState10 = React.useState(0),
|
|
3115
3119
|
scrollY = _useState10[0],
|
|
@@ -3154,13 +3158,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3154
3158
|
setIsProcessing(true);
|
|
3155
3159
|
debounceRef.current = setTimeout(function () {
|
|
3156
3160
|
var filteredTasks;
|
|
3157
|
-
|
|
3158
|
-
if (onExpanderClick) {
|
|
3159
|
-
filteredTasks = removeHiddenTasks(tasks);
|
|
3160
|
-
} else {
|
|
3161
|
-
filteredTasks = tasks;
|
|
3162
|
-
}
|
|
3163
|
-
|
|
3161
|
+
filteredTasks = removeHiddenTasks(tasks);
|
|
3164
3162
|
filteredTasks = filteredTasks.sort(sortTasks);
|
|
3165
3163
|
|
|
3166
3164
|
var _ganttDateRange2 = ganttDateRange(filteredTasks, viewMode, preStepsCount),
|
|
@@ -3202,7 +3200,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3202
3200
|
setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor));
|
|
3203
3201
|
setIsProcessing(false);
|
|
3204
3202
|
}, delayToRender);
|
|
3205
|
-
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl
|
|
3203
|
+
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl]);
|
|
3206
3204
|
React.useEffect(function () {
|
|
3207
3205
|
return function () {
|
|
3208
3206
|
clearTimeout(debounceRef.current);
|
|
@@ -3281,6 +3279,8 @@ var Gantt = function Gantt(_ref) {
|
|
|
3281
3279
|
React.useEffect(function () {
|
|
3282
3280
|
var _wrapperRef$current, _wrapperRef$current2, _wrapperRef$current3, _wrapperRef$current4;
|
|
3283
3281
|
|
|
3282
|
+
if (isProcessing) return;
|
|
3283
|
+
|
|
3284
3284
|
var handleWheel = function handleWheel(event) {
|
|
3285
3285
|
if (event.shiftKey || event.deltaX) {
|
|
3286
3286
|
var scrollMove = event.deltaX ? event.deltaX : event.deltaY;
|
|
@@ -3373,7 +3373,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3373
3373
|
(_wrapperRef$current7 = wrapperRef.current) === null || _wrapperRef$current7 === void 0 ? void 0 : _wrapperRef$current7.removeEventListener("touchend", handleLogTouch);
|
|
3374
3374
|
(_wrapperRef$current8 = wrapperRef.current) === null || _wrapperRef$current8 === void 0 ? void 0 : _wrapperRef$current8.removeEventListener("touchend", handleLogTouch);
|
|
3375
3375
|
};
|
|
3376
|
-
}, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight]);
|
|
3376
|
+
}, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight, isProcessing]);
|
|
3377
3377
|
|
|
3378
3378
|
var handleScrollY = function handleScrollY(event) {
|
|
3379
3379
|
if (scrollY !== event.currentTarget.scrollTop && !ignoreScrollEvent) {
|
|
@@ -3551,7 +3551,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3551
3551
|
className: styles$9.wrapper,
|
|
3552
3552
|
style: {
|
|
3553
3553
|
position: "relative",
|
|
3554
|
-
minHeight:
|
|
3554
|
+
minHeight: ganttHeight + 70 || 400
|
|
3555
3555
|
}
|
|
3556
3556
|
}, React__default.createElement("div", {
|
|
3557
3557
|
style: {
|