diff --git a/src/routes/v2/pages/Editor/components/AnnotationsBlock/AnnotationsBlock.tsx b/src/routes/v2/pages/Editor/components/AnnotationsBlock/AnnotationsBlock.tsx index 680da093a..7cf541017 100644 --- a/src/routes/v2/pages/Editor/components/AnnotationsBlock/AnnotationsBlock.tsx +++ b/src/routes/v2/pages/Editor/components/AnnotationsBlock/AnnotationsBlock.tsx @@ -114,11 +114,21 @@ function AnnotationRow({ annotation, index, annotations }: AnnotationRowProps) { useAnnotationActions(); const handleUpdateKey = (event: ChangeEvent) => { - updateAnnotationKey(annotations, index, event.target.value); + const newKey = event.target.value; + if (newKey !== annotation.key) { + updateAnnotationKey(annotations, index, newKey); + } }; const handleUpdateValue = (event: ChangeEvent) => { - updateAnnotationValue(annotations, index, String(event.target.value)); + const newValue = String(event.target.value); + const currentValue = + typeof annotation.value === "object" + ? JSON.stringify(annotation.value) + : String(annotation.value ?? ""); + if (newValue !== currentValue) { + updateAnnotationValue(annotations, index, newValue); + } }; const handleRemove = () => { diff --git a/src/routes/v2/pages/Editor/nodes/TaskNode/context/TaskDetails/TaskDetails.tsx b/src/routes/v2/pages/Editor/nodes/TaskNode/context/TaskDetails/TaskDetails.tsx index 0ba784290..896cc858c 100644 --- a/src/routes/v2/pages/Editor/nodes/TaskNode/context/TaskDetails/TaskDetails.tsx +++ b/src/routes/v2/pages/Editor/nodes/TaskNode/context/TaskDetails/TaskDetails.tsx @@ -208,7 +208,11 @@ export const TaskDetails = observer(function TaskDetails({ - +