Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

core: fix group header for search results hidden

Abdullah Atta1932d27f1c0e
diff --git a/apps/web/package-lock.json b/apps/web/package-lock.json
index ebd2587a6..50d8e1721 100644
--- a/apps/web/package-lock.json
+++ b/apps/web/package-lock.json
@@ -43235,7 +43235,7 @@
},
"../desktop": {
"name": "@notesnook/desktop",
- "version": "3.2.0-beta.7",
+ "version": "3.2.0-beta.9",
"hasInstallScript": true,
"license": "GPL-3.0-or-later",
"dependencies": {
diff --git a/packages/core/src/api/lookup.ts b/packages/core/src/api/lookup.ts
index 42e910f5c..9eb79d41f 100644
--- a/packages/core/src/api/lookup.ts
+++ b/packages/core/src/api/lookup.ts
@@ -40,6 +40,7 @@ import { getSortSelectors, groupArray } from "../utils/grouping.js";
import { fuzzy } from "../utils/fuzzy.js";
import { extractMatchingBlocks } from "../utils/html-parser.js";
import { Parser } from "htmlparser2";
+import { strings } from "@notesnook/intl";
type SearchResults<T> = {
sorted: (sortOptions?: SortOptions) => Promise<VirtualizedGrouping<T>>;
@@ -303,7 +304,21 @@ export default class Lookup {
ids: results.map((c) => c.id),
items: results
};
- }
+ },
+ () =>
+ new Map([
+ [
+ 0,
+ {
+ index: 0,
+ group: {
+ id: "0",
+ title: "",
+ type: "header"
+ }
+ }
+ ]
+ ])
);
}