From e08c4515a7cc254ce0b30f91834a25e19ff5a944 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 27 Aug 2025 19:49:22 +0300 Subject: [PATCH] fix(react/ribbon): note type not always updating --- apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx b/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx index ea0ca6948..ce01fa3d8 100644 --- a/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx +++ b/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx @@ -38,7 +38,10 @@ export default function BasicPropertiesTab({ note }: TabContext) { function NoteTypeWidget({ note }: { note?: FNote | null }) { const noteTypes = useMemo(() => NOTE_TYPES.filter((nt) => !nt.reserved && !nt.static), []); const [ codeNotesMimeTypes ] = useTriliumOption("codeNotesMimeTypes"); - const mimeTypes = useMemo(() => mime_types.getMimeTypes().filter(mimeType => mimeType.enabled), [ codeNotesMimeTypes ]); + const mimeTypes = useMemo(() => { + mime_types.loadMimeTypes(); + return mime_types.getMimeTypes().filter(mimeType => mimeType.enabled) + }, [ codeNotesMimeTypes ]); const notSelectableNoteTypes = useMemo(() => NOTE_TYPES.filter((nt) => nt.reserved || nt.static).map((nt) => nt.type), []); const currentNoteType = useNoteProperty(note, "type") ?? undefined;