Commit bfcf0a44
| SHA | bfcf0a4429e4d182307eb4c8599d4d11e9cc5bed |
|---|---|
| Author | MohamedBassem <me at mbassem dot com> |
| Author Date | 2024-05-19 16:43 +0100 |
| Committer | MohamedBassem <me at mbassem dot com> |
| Commit Date | 2024-05-19 16:43 +0100 |
| Parent(s) | e8b47751660e (diff) |
| Tree | 739218f3ca0f |
fix(web): Sort the tags in the TagsEditor of the preview dialog. Fixes #171
| File | + | - | Graph | |
|---|---|---|---|---|
| M | apps/web/components/dashboard/bookmarks/TagsEditor.tsx | +2 | -0 |
|
1 file(s) changed, 2 insertions(+), 0 deletions(-)
apps/web/components/dashboard/bookmarks/TagsEditor.tsx
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>,