diff --git a/apps/client/src/widgets/react/NoteAutocomplete.tsx b/apps/client/src/widgets/react/NoteAutocomplete.tsx index fb5274318..2fd250c76 100644 --- a/apps/client/src/widgets/react/NoteAutocomplete.tsx +++ b/apps/client/src/widgets/react/NoteAutocomplete.tsx @@ -60,13 +60,16 @@ export default function NoteAutocomplete({ inputRef: _ref, text, placeholder, on useEffect(() => { if (!ref.current) return; - if (text) { - const $autoComplete = $(ref.current); + const $autoComplete = $(ref.current); + + if (noteId) { + $autoComplete.setNote(noteId); + } else if (text) { note_autocomplete.setText($autoComplete, text); } else { ref.current.value = ""; } - }, [text]); + }, [text, noteId]); return (