From 3d5ba8ce055d6d0a16ac1c3733a7370a12902215 Mon Sep 17 00:00:00 2001 From: Jakob Schlanstedt Date: Fri, 21 Nov 2025 11:31:49 +0100 Subject: [PATCH] fix(NoteAutocomplete): use new API --- apps/client/src/widgets/collections/board/index.tsx | 3 ++- apps/client/src/widgets/type_widgets/Empty.tsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/client/src/widgets/collections/board/index.tsx b/apps/client/src/widgets/collections/board/index.tsx index 7b939224d..9d0a72df5 100644 --- a/apps/client/src/widgets/collections/board/index.tsx +++ b/apps/client/src/widgets/collections/board/index.tsx @@ -15,6 +15,7 @@ import FormTextArea from "../../react/FormTextArea"; import FNote from "../../../entities/fnote"; import NoteAutocomplete from "../../react/NoteAutocomplete"; import toast from "../../../services/toast"; +import { CreateMode } from "../../../services/note_autocomplete"; export interface BoardViewData { columns?: BoardColumnData[]; @@ -298,7 +299,7 @@ export function TitleEditor({ currentValue, placeholder, save, dismiss, mode, is noteId={currentValue ?? ""} opts={{ hideAllButtons: true, - allowCreatingNotes: true + createMode: CreateMode.CreateAndLink }} onKeyDown={(e) => { if (e.key === "Escape") { diff --git a/apps/client/src/widgets/type_widgets/Empty.tsx b/apps/client/src/widgets/type_widgets/Empty.tsx index eb0f0c5ee..1941ea824 100644 --- a/apps/client/src/widgets/type_widgets/Empty.tsx +++ b/apps/client/src/widgets/type_widgets/Empty.tsx @@ -4,7 +4,7 @@ import FormGroup from "../react/FormGroup"; import NoteAutocomplete from "../react/NoteAutocomplete"; import "./Empty.css"; import { ParentComponent, refToJQuerySelector } from "../react/react_utils"; -import note_autocomplete from "../../services/note_autocomplete"; +import note_autocomplete, { CreateMode } from "../../services/note_autocomplete"; import appContext from "../../components/app_context"; import FNote from "../../entities/fnote"; import search from "../../services/search"; @@ -38,7 +38,7 @@ function NoteSearch() { inputRef={autocompleteRef} opts={{ hideGoToSelectedNoteButton: true, - allowCreatingNotes: true, + createMode: CreateMode.CreateOnly, allowJumpToSearchNotes: true, }} onChange={suggestion => {