Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(ribbon): code note types not refreshing
Elian Doran1e1c8cc4ff09
diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsxindex 0c211739c5..d1719b1478 100644--- a/apps/client/src/widgets/react/hooks.tsx+++ b/apps/client/src/widgets/react/hooks.tsx@@ -102,7 +102,7 @@ export function useTriliumOption(name: OptionNames, needsRefresh?: boolean): [stconst newValue = options.get(name);setValue(newValue);}- }, [ name ]));+ }, [ name, setValue ]));useDebugValue(name);diff --git a/apps/client/src/widgets/type_widgets/options/code_notes.tsx b/apps/client/src/widgets/type_widgets/options/code_notes.tsxindex a9f30bacc9..cf951e3b26 100644--- a/apps/client/src/widgets/type_widgets/options/code_notes.tsx+++ b/apps/client/src/widgets/type_widgets/options/code_notes.tsx@@ -145,7 +145,7 @@ function CodeMimeTypes() {result[initial].push(mimeType);}return result;- }, []);+ }, [ codeNotesMimeTypes ]);return (<OptionsSection title={t("code_mime_types.title")}>