diff options
| author | xuatz <xzlow10@gmail.com> | 2025-05-18 17:21:11 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-18 09:21:11 +0100 |
| commit | dbd0fd197323f2a83fab384d7b4b116a02165d16 (patch) | |
| tree | 2bd3c34bd7088b32ae7f0e33910d54b73a620366 /apps/web/components/dashboard/bookmarks | |
| parent | f338f7b102e538889e4f16fac407f4d5f17fdf69 (diff) | |
| download | karakeep-dbd0fd197323f2a83fab384d7b4b116a02165d16.tar.zst | |
fix(search): add new relevance sort order (#1392)
* fix(search): add new relevance sort order
* address pr comments
* some minor fixes
---------
Co-authored-by: Mohamed Bassem <me@mbassem.com>
Diffstat (limited to 'apps/web/components/dashboard/bookmarks')
| -rw-r--r-- | apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx b/apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx index da65b9d9..968d0326 100644 --- a/apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx +++ b/apps/web/components/dashboard/bookmarks/UpdatableBookmarksGrid.tsx @@ -23,7 +23,11 @@ export default function UpdatableBookmarksGrid({ showEditorCard?: boolean; itemsPerPage?: number; }) { - const sortOrder = useSortOrderStore((state) => state.sortOrder); + let sortOrder = useSortOrderStore((state) => state.sortOrder); + if (sortOrder === "relevance") { + // Relevance is not supported in the `getBookmarks` endpoint. + sortOrder = "desc"; + } const finalQuery = { ...query, sortOrder, includeContent: false }; |
