Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix(web): Sort the tags in the TagsEditor of the preview dialog. Fixes #171

MohamedBassembfcf0a4429e4
diff --git a/apps/web/components/dashboard/bookmarks/TagsEditor.tsx b/apps/web/components/dashboard/bookmarks/TagsEditor.tsx
index 4c836b32..6ea6cf53 100644
--- a/apps/web/components/dashboard/bookmarks/TagsEditor.tsx
+++ b/apps/web/components/dashboard/bookmarks/TagsEditor.tsx
@@ -37,6 +37,8 @@ export function TagsEditor({ bookmark }: { bookmark: ZBookmark }) {
const { data: existingTags, isLoading: isExistingTagsLoading } =
api.tags.list.useQuery();
+ existingTags?.tags.sort((a, b) => a.name.localeCompare(b.name));
+
const onChange = (
_option: readonly EditableTag[],
actionMeta: ActionMeta<EditableTag>,