Skip to content

Commit

Permalink
Merge pull request #217 from melfore/215-incorrect-resourceid-in-area…
Browse files Browse the repository at this point in the history
…select-type

[Task]Fixed areaselect return
  • Loading branch information
CrisGrud committed Jul 9, 2024
2 parents ca96737 + 3edcae2 commit 202a455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/timeline/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ const Timeline: FC<TimelineProps> = () => {

const createNewTaskData = useCallback(() => {
const taksRange = onEndTimeRange(newTaskDimension, resolution, columnWidth, interval);
return { resourceId: newTaskDimension.row.toString(), range: taksRange };
}, [newTaskDimension, columnWidth, resolution, interval]);
return { resourceId: resources[newTaskDimension.row].id, range: taksRange };
}, [newTaskDimension, columnWidth, resolution, interval, resources]);

const onMouseDown = useCallback(
(e: KonvaEventObject<MouseEvent>) => {
Expand Down

0 comments on commit 202a455

Please sign in to comment.