mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
fix(react/ribbon): note type not always updating
This commit is contained in:
parent
650aa16b89
commit
e08c4515a7
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user