gantt-lib 0.53.0 → 0.53.1

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.mjs CHANGED
@@ -3295,6 +3295,20 @@ var DatePicker = ({
3295
3295
  },
3296
3296
  [selectedDate, updateFromDate, businessDays, isWeekend3]
3297
3297
  );
3298
+ const handleTriggerKeyDown = useCallback3((e) => {
3299
+ if (disabled) return;
3300
+ if (e.key === "ArrowUp") {
3301
+ e.preventDefault();
3302
+ e.stopPropagation();
3303
+ handleDayShift(1);
3304
+ return;
3305
+ }
3306
+ if (e.key === "ArrowDown") {
3307
+ e.preventDefault();
3308
+ e.stopPropagation();
3309
+ handleDayShift(-1);
3310
+ }
3311
+ }, [disabled, handleDayShift]);
3298
3312
  const handleKeyDown = useCallback3((e) => {
3299
3313
  if (!dateInputRef.current) return;
3300
3314
  const { value: inputVal } = dateInputRef.current;
@@ -3402,6 +3416,7 @@ var DatePicker = ({
3402
3416
  type: "button",
3403
3417
  className: `gantt-datepicker-trigger${className ? ` ${className}` : ""}`,
3404
3418
  disabled,
3419
+ onKeyDown: handleTriggerKeyDown,
3405
3420
  onClick: (e) => {
3406
3421
  e.stopPropagation();
3407
3422
  },
@@ -6603,20 +6618,8 @@ function GanttChartInner(props, ref) {
6603
6618
  }
6604
6619
  return;
6605
6620
  }
6606
- const isParent = isTaskParent(updatedTask.id, tasks);
6607
- if (isParent) {
6608
- const { startDate: parentStart, endDate: parentEnd } = computeParentDates(updatedTask.id, tasks);
6609
- const parentWithRecalcDates = {
6610
- ...updatedTask,
6611
- startDate: parentStart.toISOString().split("T")[0],
6612
- endDate: parentEnd.toISOString().split("T")[0]
6613
- };
6614
- const cascadedTasks = disableConstraints ? [parentWithRecalcDates] : universalCascade(parentWithRecalcDates, parentStart, parentEnd, tasks, businessDays, isCustomWeekend);
6615
- onTasksChange?.(cascadedTasks);
6616
- } else {
6617
- const cascadedTasks = disableConstraints ? [updatedTask] : universalCascade(updatedTask, newStart, newEnd, tasks, businessDays, isCustomWeekend);
6618
- onTasksChange?.(cascadedTasks);
6619
- }
6621
+ const cascadedTasks = disableConstraints ? [updatedTask] : universalCascade(updatedTask, newStart, newEnd, tasks, businessDays, isCustomWeekend);
6622
+ onTasksChange?.(cascadedTasks);
6620
6623
  }, [tasks, onTasksChange, disableConstraints, editingTaskId, businessDays, isCustomWeekend]);
6621
6624
  const handleDelete = useCallback6((taskId) => {
6622
6625
  const toDelete = /* @__PURE__ */ new Set([taskId]);