1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-19 15:43:49 +02:00

fix: todo uncheck (#6126)

This commit is contained in:
Arik Chakma
2024-07-11 05:10:17 +06:00
committed by GitHub
parent 1330e5c4b9
commit f16aa78829
2 changed files with 8 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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;
}
@@ -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={() => {