Skip to content

Commit

Permalink
fix: todo uncheck (#6126)
Browse files Browse the repository at this point in the history
  • Loading branch information
arikchakma authored Jul 10, 2024
1 parent 1330e5c commit f16aa78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/components/CustomRoadmap/FlowRoadmapRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ export function FlowRoadmapRenderer(props: FlowRoadmapRendererProps) {
}

const handleTopicRightClick = useCallback((e: MouseEvent, node: Node) => {
const target = e?.currentTarget as HTMLDivElement;
const target =
node?.type === 'todo'
? document.querySelector(`[data-id="${node.id}"]`)
: (e?.currentTarget as HTMLDivElement);
if (!target) {
return;
}
Expand Down
6 changes: 4 additions & 2 deletions src/components/TeamProgress/MemberCustomProgressModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ export function MemberCustomProgressModal(props: ProgressMapProps) {
return;
}

const target = e?.currentTarget as HTMLDivElement;
const target =
node?.type === 'todo'
? document.querySelector(`[data-id="${node.id}"]`)
: (e?.currentTarget as HTMLDivElement);
if (!target) {
return;
}
Expand Down Expand Up @@ -237,7 +240,6 @@ export function MemberCustomProgressModal(props: ProgressMapProps) {
<div className="px-4 pb-2">
<ReadonlyEditor
variant="modal"
hasMinimap={false}
roadmap={roadmap!}
className="min-h-[400px]"
onRendered={() => {
Expand Down

0 comments on commit f16aa78

Please sign in to comment.