diff --git a/apps/client/src/services/attributes.ts b/apps/client/src/services/attributes.ts index 91ebbff5c..0b605f5bd 100644 --- a/apps/client/src/services/attributes.ts +++ b/apps/client/src/services/attributes.ts @@ -61,7 +61,7 @@ function removeOwnedLabelByName(note: FNote, labelName: string) { * @param value the value of the attribute to set. */ export async function setAttribute(note: FNote, type: "label" | "relation", name: string, value: string | null | undefined) { - if (value) { + if (value !== null && value !== undefined) { // Create or update the attribute. await server.put(`notes/${note.noteId}/set-attribute`, { type, name, value }); } else { diff --git a/apps/client/src/widgets/react/FormTextArea.tsx b/apps/client/src/widgets/react/FormTextArea.tsx index d15fb879c..354a02b4e 100644 --- a/apps/client/src/widgets/react/FormTextArea.tsx +++ b/apps/client/src/widgets/react/FormTextArea.tsx @@ -1,4 +1,4 @@ -import { TextareaHTMLAttributes } from "preact/compat"; +import { RefObject, TextareaHTMLAttributes } from "preact/compat"; interface FormTextAreaProps extends Omit { id?: string; @@ -6,10 +6,12 @@ interface FormTextAreaProps extends Omit } -export default function FormTextArea({ id, onBlur, onChange, rows, currentValue, className, ...restProps }: FormTextAreaProps) { +export default function FormTextArea({ inputRef, id, onBlur, onChange, rows, currentValue, className, ...restProps }: FormTextAreaProps) { return (