mirror of
https://github.com/zadam/trilium.git
synced 2026-07-07 15:33:42 +02:00
feat(hooks): react faster to setting options
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user