gantt-task-react-v 1.5.14 → 1.5.15

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.
@@ -20847,6 +20847,14 @@ const Gantt = (props) => {
20847
20847
  },
20848
20848
  [enableDrawer, taskBar]
20849
20849
  );
20850
+ const handleTaskListRowClick = useCallback(
20851
+ (task) => {
20852
+ if (taskList.onClickRow) {
20853
+ taskList.onClickRow(task);
20854
+ }
20855
+ },
20856
+ [taskList]
20857
+ );
20850
20858
  const handleTaskListRowDoubleClick = useCallback(
20851
20859
  (task) => {
20852
20860
  if (task.type !== "empty") {
@@ -21206,6 +21214,7 @@ const Gantt = (props) => {
21206
21214
  handleMoveTasksInside,
21207
21215
  handleOpenContextMenu: handleOpenContextMenuForRow,
21208
21216
  mapTaskToNestedIndex,
21217
+ onClick: handleTaskListRowClick,
21209
21218
  onDoubleClick: handleTaskListRowDoubleClick,
21210
21219
  onExpanderClick,
21211
21220
  scrollToBottomStep,
@@ -21237,6 +21246,7 @@ const Gantt = (props) => {
21237
21246
  handleMoveTaskBefore,
21238
21247
  handleMoveTasksInside,
21239
21248
  handleOpenContextMenuForRow,
21249
+ handleTaskListRowClick,
21240
21250
  handleTaskListRowDoubleClick,
21241
21251
  mapTaskToNestedIndex,
21242
21252
  onExpanderClick,
@@ -20864,6 +20864,14 @@
20864
20864
  },
20865
20865
  [enableDrawer, taskBar]
20866
20866
  );
20867
+ const handleTaskListRowClick = React.useCallback(
20868
+ (task) => {
20869
+ if (taskList.onClickRow) {
20870
+ taskList.onClickRow(task);
20871
+ }
20872
+ },
20873
+ [taskList]
20874
+ );
20867
20875
  const handleTaskListRowDoubleClick = React.useCallback(
20868
20876
  (task) => {
20869
20877
  if (task.type !== "empty") {
@@ -21223,6 +21231,7 @@
21223
21231
  handleMoveTasksInside,
21224
21232
  handleOpenContextMenu: handleOpenContextMenuForRow,
21225
21233
  mapTaskToNestedIndex,
21234
+ onClick: handleTaskListRowClick,
21226
21235
  onDoubleClick: handleTaskListRowDoubleClick,
21227
21236
  onExpanderClick,
21228
21237
  scrollToBottomStep,
@@ -21254,6 +21263,7 @@
21254
21263
  handleMoveTaskBefore,
21255
21264
  handleMoveTasksInside,
21256
21265
  handleOpenContextMenuForRow,
21266
+ handleTaskListRowClick,
21257
21267
  handleTaskListRowDoubleClick,
21258
21268
  mapTaskToNestedIndex,
21259
21269
  onExpanderClick,
@@ -184,6 +184,11 @@ export interface GanttTaskListProps {
184
184
  * Render bottom table content
185
185
  */
186
186
  tableBottom?: TableRenderBottomProps;
187
+ /**
188
+ * Invokes on single click on a task list row.
189
+ * Receives the full task data of the clicked row.
190
+ */
191
+ onClickRow?: (task: RenderTask) => void;
187
192
  /**
188
193
  * Invokes on double-click on a task list row.
189
194
  * Receives the full task data of the double-clicked row.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-task-react-v",
3
- "version": "1.5.14",
3
+ "version": "1.5.15",
4
4
  "description": "Interactive Gantt Chart for React with TypeScript.",
5
5
  "author": "aguilanbon",
6
6
  "homepage": "https://github.com/aguilanbon/gantt-task-react-v",