mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 22:34:23 +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(() => {
|
const wrappedSetValue = useMemo(() => {
|
||||||
return async (newValue: OptionValue) => {
|
return async (newValue: OptionValue) => {
|
||||||
|
setValue(String(newValue));
|
||||||
await options.save(name, newValue);
|
await options.save(name, newValue);
|
||||||
|
|
||||||
if (needsRefresh) {
|
if (needsRefresh) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user