Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,21 @@ function AnnotationRow({ annotation, index, annotations }: AnnotationRowProps) {
useAnnotationActions();

const handleUpdateKey = (event: ChangeEvent<HTMLInputElement>) => {
updateAnnotationKey(annotations, index, event.target.value);
const newKey = event.target.value;
if (newKey !== annotation.key) {
updateAnnotationKey(annotations, index, newKey);
}
};

const handleUpdateValue = (event: ChangeEvent<HTMLInputElement>) => {
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 = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ export const TaskDetails = observer(function TaskDetails({

<Separator />

<AnnotationsBlock annotations={task.annotations} defaultEditing />
<AnnotationsBlock
annotations={task.annotations}
defaultEditing
ignoreAnnotationKeys={EDITOR_ANNOTATION_KEYS}
/>
</BlockStack>
</TabsContent>
</Tabs>
Expand Down
Loading