fix: todo uncheck (#6126)

pull/6129/head
Arik Chakma 5 months ago committed by GitHub
parent 1330e5c4b9
commit f16aa78829
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      src/components/CustomRoadmap/FlowRoadmapRenderer.tsx
  2. 6
      src/components/TeamProgress/MemberCustomProgressModal.tsx

@ -62,7 +62,10 @@ export function FlowRoadmapRenderer(props: FlowRoadmapRendererProps) {
} }
const handleTopicRightClick = useCallback((e: MouseEvent, node: Node) => { 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) { if (!target) {
return; return;
} }

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

Loading…
Cancel
Save