gantt-task-react-v 1.1.10 → 1.1.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.
|
@@ -8,6 +8,8 @@ type ContextMenuProps = {
|
|
|
8
8
|
handleAction: (task: RenderTask, action: (meta: ActionMetaType) => void) => void;
|
|
9
9
|
handleCloseContextMenu: () => void;
|
|
10
10
|
options: ContextMenuOptionType[];
|
|
11
|
+
/** Optional callback invoked to select the task that opened the context menu (useful for task list) */
|
|
12
|
+
onSelectTask?: (taskId: string) => void;
|
|
11
13
|
/** Optional boundary element to contain the context menu (like tooltips) */
|
|
12
14
|
boundaryElement?: RefObject<HTMLElement>;
|
|
13
15
|
};
|
|
@@ -18089,10 +18089,12 @@ function ContextMenu(props) {
|
|
|
18089
18089
|
}, [task, checkHasCopyTasks, checkHasCutTasks, options]);
|
|
18090
18090
|
const handleOptionAction = useCallback(
|
|
18091
18091
|
(option) => {
|
|
18092
|
+
var _a2;
|
|
18092
18093
|
handleCloseContextMenu();
|
|
18093
18094
|
if (!task) {
|
|
18094
18095
|
return;
|
|
18095
18096
|
}
|
|
18097
|
+
(_a2 = props.onSelectTask) == null ? void 0 : _a2.call(props, task.id);
|
|
18096
18098
|
handleAction(task, option.action);
|
|
18097
18099
|
},
|
|
18098
18100
|
[handleAction, handleCloseContextMenu, task]
|
|
@@ -19007,6 +19009,7 @@ const Gantt = (props) => {
|
|
|
19007
19009
|
cutSelectedTasks,
|
|
19008
19010
|
cutTask,
|
|
19009
19011
|
resetSelectedTasks,
|
|
19012
|
+
selectTask,
|
|
19010
19013
|
selectTaskOnMouseDown,
|
|
19011
19014
|
selectedIdsMirror
|
|
19012
19015
|
} = useSelection(
|
|
@@ -20261,6 +20264,7 @@ const Gantt = (props) => {
|
|
|
20261
20264
|
distances,
|
|
20262
20265
|
handleAction,
|
|
20263
20266
|
handleCloseContextMenu,
|
|
20267
|
+
onSelectTask: selectTask,
|
|
20264
20268
|
options: contextMenuOptions,
|
|
20265
20269
|
boundaryElement: taskListHorizontalScrollRef
|
|
20266
20270
|
}
|
|
@@ -18106,10 +18106,12 @@
|
|
|
18106
18106
|
}, [task, checkHasCopyTasks, checkHasCutTasks, options]);
|
|
18107
18107
|
const handleOptionAction = React.useCallback(
|
|
18108
18108
|
(option) => {
|
|
18109
|
+
var _a2;
|
|
18109
18110
|
handleCloseContextMenu();
|
|
18110
18111
|
if (!task) {
|
|
18111
18112
|
return;
|
|
18112
18113
|
}
|
|
18114
|
+
(_a2 = props.onSelectTask) == null ? void 0 : _a2.call(props, task.id);
|
|
18113
18115
|
handleAction(task, option.action);
|
|
18114
18116
|
},
|
|
18115
18117
|
[handleAction, handleCloseContextMenu, task]
|
|
@@ -19024,6 +19026,7 @@
|
|
|
19024
19026
|
cutSelectedTasks,
|
|
19025
19027
|
cutTask,
|
|
19026
19028
|
resetSelectedTasks,
|
|
19029
|
+
selectTask,
|
|
19027
19030
|
selectTaskOnMouseDown,
|
|
19028
19031
|
selectedIdsMirror
|
|
19029
19032
|
} = useSelection(
|
|
@@ -20278,6 +20281,7 @@
|
|
|
20278
20281
|
distances,
|
|
20279
20282
|
handleAction,
|
|
20280
20283
|
handleCloseContextMenu,
|
|
20284
|
+
onSelectTask: selectTask,
|
|
20281
20285
|
options: contextMenuOptions,
|
|
20282
20286
|
boundaryElement: taskListHorizontalScrollRef
|
|
20283
20287
|
}
|
package/package.json
CHANGED