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