mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 14:24:27 +01:00
feat(hooks): react faster to setting options
This commit is contained in:
parent
3d9efb23ec
commit
06ad0bfa90
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user