From b5555d94f5fcc3dc7fd33471d85edaf5d8da16f6 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 10 Aug 2025 18:01:36 +0300 Subject: [PATCH] fix(react/dialogs): note autocomplete not restoring note --- apps/client/src/widgets/react/NoteAutocomplete.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 (