mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 18:05:55 +01:00 
			
		
		
		
	fix(react/dialogs): note autocomplete not restoring note
This commit is contained in:
		| @@ -60,13 +60,16 @@ export default function NoteAutocomplete({ inputRef: _ref, text, placeholder, on | |||||||
|  |  | ||||||
|     useEffect(() => { |     useEffect(() => { | ||||||
|         if (!ref.current) return; |         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); |             note_autocomplete.setText($autoComplete, text); | ||||||
|         } else { |         } else { | ||||||
|             ref.current.value = ""; |             ref.current.value = ""; | ||||||
|         } |         } | ||||||
|     }, [text]); |     }, [text, noteId]); | ||||||
|  |  | ||||||
|     return ( |     return ( | ||||||
|         <div className="input-group" style={containerStyle}> |         <div className="input-group" style={containerStyle}> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user