From 929eee135021ef386a1ff64b798381db195fb2a2 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 20 Oct 2025 16:17:36 +0300 Subject: [PATCH] fix(client/search): note IDs being calculated twice in search --- apps/client/src/widgets/collections/NoteList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/client/src/widgets/collections/NoteList.tsx b/apps/client/src/widgets/collections/NoteList.tsx index e71aa09c9..f76dd4b5d 100644 --- a/apps/client/src/widgets/collections/NoteList.tsx +++ b/apps/client/src/widgets/collections/NoteList.tsx @@ -39,7 +39,7 @@ export function SearchNoteList(props: Omit({ note, isEnabled: shouldEnable, notePath, highlightedTokens, displayOnlyCollections, ntxId, onReady, ...restProps }: NoteListProps) { const widgetRef = useRef(null); const viewType = useNoteViewType(note); - const noteIds = useNoteIds(note, viewType, ntxId); + const noteIds = useNoteIds(shouldEnable ? note : null, viewType, ntxId); const isFullHeight = (viewType && viewType !== "list" && viewType !== "grid"); const [ isIntersecting, setIsIntersecting ] = useState(false); const shouldRender = (isFullHeight || isIntersecting || note?.type === "book");