Skip to content

Build your personal knowledge base with Trilium Notes

feat(hooks): react faster to setting options

Elian Doran06ad0bfa9014
diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx
index eadbf12a67..9540cb8adb 100644
--- a/apps/client/src/widgets/react/hooks.tsx
+++ b/apps/client/src/widgets/react/hooks.tsx
@@ -168,6 +168,7 @@ export function useTriliumOption(name: OptionNames, needsRefresh?: boolean): [st
const wrappedSetValue = useMemo(() => {
return async (newValue: OptionValue) => {
+ setValue(String(newValue));
await options.save(name, newValue);
if (needsRefresh) {